From a3ec78c7f26a0db06c1935178b1355969ab217f3 Mon Sep 17 00:00:00 2001 From: KhadijaMahanga Date: Tue, 10 Mar 2020 15:35:43 +0300 Subject: [PATCH] remove acf indicator --- wp-content/themes/hurumap/functions.php | 30 ---- .../template-parts/blocks/indicator.js | 124 --------------- .../template-parts/blocks/indicator.php | 144 ------------------ 3 files changed, 298 deletions(-) delete mode 100644 wp-content/themes/hurumap/template-parts/blocks/indicator.js delete mode 100644 wp-content/themes/hurumap/template-parts/blocks/indicator.php diff --git a/wp-content/themes/hurumap/functions.php b/wp-content/themes/hurumap/functions.php index 4c6f287b..65e1b499 100644 --- a/wp-content/themes/hurumap/functions.php +++ b/wp-content/themes/hurumap/functions.php @@ -44,10 +44,6 @@ function hurumap_block_editor_styles() wp_enqueue_style('hurumap-block-editor-style', get_theme_file_uri('/assets/css/editor-blocks.css'), array(), '1.1'); wp_enqueue_script('remove-default-styles-wrapper-script', get_theme_file_uri('/assets/js/remove-default-styles-wrapper.js')); - /** - * PDF preview script - */ - wp_enqueue_script("pdfJS", "https://mozilla.github.io/pdf.js/build/pdf.js"); } add_action('wp_enqueue_scripts', 'hurumap_load_scripts'); function hurumap_load_scripts() @@ -173,32 +169,6 @@ function bidirectional_acf_update_value( $value, $post_id, $field ) { add_filter('acf/update_value/key=field_5dee703609976', 'bidirectional_acf_update_value', 10, 6); - -/** - * Revert once all indicators have been replaced - * a custom acf block for indicators (image, documents, embed, raw-html, free-form) - * filter publish post - */ -function register_acf_block_types() -{ - // register an indicator block. - acf_register_block_type(array( - 'name' => 'Indicator', - 'title' => __('Indicator'), - 'description' => __('An indicator block.'), - 'render_template' => get_template_directory() . '/template-parts/blocks/indicator.php', - 'enqueue_script' => get_template_directory_uri() . '/template-parts/blocks/indicator.js', - 'category' => 'widgets', - 'icon' => 'admin-comments', - 'keywords' => array('indicator'), - )); - //add more block here -} -// Check if function exists and hook into setup. -if (function_exists('acf_register_block_type')) { - add_action('acf/init', 'register_acf_block_types'); -} - //rename elasticsearch/elastic press index name function custom_index_name() { return 'takwimu'; diff --git a/wp-content/themes/hurumap/template-parts/blocks/indicator.js b/wp-content/themes/hurumap/template-parts/blocks/indicator.js deleted file mode 100644 index 436b0398..00000000 --- a/wp-content/themes/hurumap/template-parts/blocks/indicator.js +++ /dev/null @@ -1,124 +0,0 @@ -(function($) { - /** - * initializeBlock - * - * Adds custom JavaScript to the block HTML. - */ - var initializeBlock = function() { - // // Loaded via