| Server IP : 10.19.1.101 / Your IP : 216.73.216.158 Web Server : Apache System : Linux web1f13.kinghost.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64 User : schererimoveisrs ( 170628) PHP Version : 7.4.33 Disable Function : apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/schererimoveisrs/www/wp-content/themes/context-blog/inc/customizer/page/ |
Upload File : |
<?php
$wp_customize->add_section(
'context_blog_single_page_section',
array(
'panel' => 'context_blog_page_settings_panel',
'title' => __( 'Single page', 'context-blog' ),
'priority' => 3,
)
);
$context_blog_post_taxonomy_arrays = array( __( 'meta', 'context-blog' ), __( 'date', 'context-blog' ), __( 'comment', 'context-blog' ) );
foreach ( $context_blog_post_taxonomy_arrays as $context_blog_post_taxonomy ) {
$wp_customize->add_setting(
'context_blog_singlepage_' . $context_blog_post_taxonomy,
array(
'default' => 1,
'sanitize_callback' => 'context_blog_sanitize_checkbox',
)
);
$wp_customize->add_control(
'context_blog_singlepage_' . $context_blog_post_taxonomy,
array(
/* translators: %s: Label */
'label' => sprintf( __( 'Show %s', 'context-blog' ), $context_blog_post_taxonomy ),
'section' => 'context_blog_single_page_section',
'type' => 'checkbox',
)
);
}
$wp_customize->add_setting(
'context_blog_single_page_related_post_text',
array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_setting(
'context_blog_singlepage_related_customize_heading',
array(
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_control(
new context_blog_Customizer_Title(
$wp_customize,
'context_blog_singlepage_related_customize_heading',
array(
'label' => __( 'Related post settings', 'context-blog' ),
'section' => 'context_blog_single_page_section',
)
)
);
$wp_customize->add_control(
'context_blog_single_page_related_post_text',
array(
'label' => __( 'Title', 'context-blog' ),
'section' => 'context_blog_single_page_section',
'type' => 'text',
'settings' => 'context_blog_single_page_related_post_text',
)
);
$wp_customize->add_setting(
'context_blog_related_posts_limit',
array(
'default' => 22,
'sanitize_callback' => 'absint',
)
);
$wp_customize->add_control(
'context_blog_related_posts_limit',
array(
'label' => __( 'Excerpt Length', 'context-blog' ),
'description' => __( 'Excerpt Length determines the no of words in short description.', 'context-blog' ),
'section' => 'context_blog_single_page_section',
'type' => 'number',
)
);