You can create a third active callback function that just references the two existing ones, for example via an anonymous function (PHP≥5.3):
// About Block Button Text
$wp_customize->add_setting( 'about_block_button_text', array(
'default' => __( 'Read More', 'my_theme_name' )
) );
$wp_customize->add_control( 'about_block_button_text', array(
'label' => __( 'About Button Text', 'my_theme_name' ),
'type' => 'text',
'section' => 'about',
'active_callback' => function( $control ) {
return (
display_about_block_button_callback( $control )
&&
display_about_block_callback( $control )
);
},
) );
Related Posts:
- How to add default images into theme customizer image control?
- Customizer: active_callback and sanitize_callback incompatibility?
- get_theme_mod outputs number when using WP_Customize_Cropped_Image_Control
- Remove specific javascript when viewing page in Customizer?
- How to add button to top of theme customizer?
- How can I clear the theme mod settings?
- wp_head makes my custom page template not work in Customizer?
- Need help setting default setting value for radio button in theme customizer
- Receiving Stripe Webhooks on a wordpress website
- Remove Customize Background and Header from Appearance admin menu without CSS or JS
- What would be a PHP command to erase all posts from category X from the last month?
- Add a wp editor to custom plugin and save data
- Dynamically change feature image in customiser
- Walker class: Problems with understanding how walk() method can be called without error
- How to Use the Function is_user_logged_in To Display Different Menus?
- Change comments form title on a page by page basis
- Add value to usermeta without removing previous values?
- Edit postmeta when user changes user role?
- String replace WordPress Site Title
- Show different Customizer Settings on Page-Tamplates
- Passing array in add_option()
- WordPress Ajax Data problem
- Remove all nav menu classes ( but keep useful ones… )
- Add attribute / custom attribute to product in woocommerce
- How can I use a $wp_customize to edit my homepage image slider?
- Why WordPress architecture is not pure object oriented and it don’t use MVC pattern? [closed]
- Customizer Show/Hide
- PHP can I add line numbers to file_get_contents()
- Displaying theme options in css
- Hide wordpress field if data is empty in post!
- Remove one value in dismissed_wp_pointers?
- Change the CSS of the Customizer API
- How to output widget
- Accessing data from a non-WP database/table within a page content
- Changing layout with wp_customise
- Selectbox in admin panel function linking to CSS
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- filter default query to show just selected level of child pages in wordpress
- Add New User, extra fields which are required?
- Redirect specific user role to specific site after login?
- Send multiple attachments with wp_mail in PHP
- custom url rewrite for wordpress
- Customizer: Multiple CSS styles on same element in Live Preview
- Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)
- Menu jumping when calling it via PHP
- Problem custom control Customizer
- Output Video Download Link in template
- Modify custom field input data before creating a new post
- “operation successful” message
- Change order of custom submenu link in WP Admin?
- I’m trying to create an array with a foreach loop, but the array only stores the last item [closed]
- WordPress Customizer Default Image
- Why is an array created in a function hooked to customize register populated when customizer is loaded but not when the front-end is loaded?
- Create page template via functions.php?
- How to create a field in customize and show that in header.php?
- Please show me how to use an if/else statement in combination with wp_enqueue
- How Do I Find & Remove H1 From Site-Title-Wrapper? [closed]
- Delete or edit postmeta with specific meta_key?
- Update if post with specific title exists
- pass html code to worpdress
- How do I custom code the start page?
- Kohana Frontend, WordPress Backend
- is_user_logged_in returning nothing on custom page
- Customize field names in backend profile edit page through function.php [duplicate]
- how to add datas in taxonomy to post with wp_insert_post
- Getting text from custom field from customizer
- Change permalink structure specific category
- WP_REST_Response – How to return Gzip answer and add Content-encoding header?
- Create Columns with Custom Walker and CSS Classes
- How can I check that the acf field value is not a duplicate when adding a post?
- Adding an Anchor Link to a wordpress menu using WPBakery Page Builder
- Removing “There is no account with that username or email address.” error message in “/wp-login.php?action=lostpassword”
- Why would the child theme load in the Customize preview, but not on the site itself?
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- Inserting a class on before_widget if checkbox is checked
- Add a new view on the Woocommerce account page
- How do I add a predefined class to a custom html element?
- How to identify which php file a plugin is using on page load?
- How to separate the taxonomies list from the form so that editing taxonmies is the same as pages and posts?
- Customizer textarea with script tag won’t work in live preview
- Redirect user role to a specific page on login in a multisite network?
- How to add a full working piece of website already coded, to a large scale Website design project?
- Allow user to choose header style
- Create custom admin page with custom text fields
- Remove node from multisites?
- custom field – changing an element or background of id div – different versions not working
- Make customizer panel or section button
- Multisite – Display different header content based on which site is accessed
- How to get php file based on URL in WordPress
- How can I customize a WordPress theme before it’s downloaded?
- Replace Underscore (_) on Space ( )
- Why isn’t my custom Javascript showing up in my custom template?
- A Customizer checkbox control that sets the setting to “” or to “blank” and show() or hide() a color control
- Create Customization Controls from Array
- PHP call div with function
- Where can I find the code for the menu page meta boxes?
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- HTML in PHP problem [closed]
- Woocommerce linking variations
- How to continuously developing a WP site that is already deployed in production without damaging it during development