Changeset 2682983
- Timestamp:
- 02/22/2022 12:27:11 PM (4 years ago)
- Location:
- leyka
- Files:
-
- 2 edited
-
tags/3.24/templates/leyka-revo/leyka-revo-init.php (modified) (1 diff)
-
trunk/templates/leyka-revo/leyka-revo-init.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
leyka/tags/3.24/templates/leyka-revo/leyka-revo-init.php
r2682501 r2682983 5 5 6 6 // Revo campaigns have different elements order: 7 if( !is_admin() && is_main_query() && is_singular(Leyka_Campaign_Management::$post_type) ){7 add_action('pre_get_posts', function(WP_Query $query){ 8 8 9 remove_filter('the_content', 'leyka_print_donation_elements'); 10 if( !leyka_options()->opt_template('do_not_display_donation_form') ) { 11 add_filter('the_content', 'leyka_revo_template_campaign_page'); 9 if( // Can't use $query->is_singular(Leyka_Campaign_Management::$post_type) here, 10 // because there is no $query->get_queried_object_id() value at this point 11 $query->is_main_query() 12 && $query->is_singular() 13 && $query->get('post_type') == Leyka_Campaign_Management::$post_type 14 && $query->get('name') 15 ) { 16 17 remove_filter('the_content', 'leyka_print_donation_elements'); 18 19 if( !leyka_options()->opt_template('do_not_display_donation_form') ) { 20 add_filter('the_content', 'leyka_revo_template_campaign_page'); 21 } 22 12 23 } 13 24 14 } 25 }, 11); 15 26 16 27 function leyka_revo_template_campaign_page($content) { -
leyka/trunk/templates/leyka-revo/leyka-revo-init.php
r2619511 r2682983 5 5 6 6 // Revo campaigns have different elements order: 7 if( !is_admin() && is_main_query() && is_singular(Leyka_Campaign_Management::$post_type) ){7 add_action('pre_get_posts', function(WP_Query $query){ 8 8 9 remove_filter('the_content', 'leyka_print_donation_elements'); 10 if( !leyka_options()->opt_template('do_not_display_donation_form') ) { 11 add_filter('the_content', 'leyka_revo_template_campaign_page'); 9 if( // Can't use $query->is_singular(Leyka_Campaign_Management::$post_type) here, 10 // because there is no $query->get_queried_object_id() value at this point 11 $query->is_main_query() 12 && $query->is_singular() 13 && $query->get('post_type') == Leyka_Campaign_Management::$post_type 14 && $query->get('name') 15 ) { 16 17 remove_filter('the_content', 'leyka_print_donation_elements'); 18 19 if( !leyka_options()->opt_template('do_not_display_donation_form') ) { 20 add_filter('the_content', 'leyka_revo_template_campaign_page'); 21 } 22 12 23 } 13 24 14 } 25 }, 11); 15 26 16 27 function leyka_revo_template_campaign_page($content) {
Note: See TracChangeset
for help on using the changeset viewer.