This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rating = '3'; | |
printf(esc_html( _n( '%s star', '%s stars', $ratting, 'domain' ), $rating )); | |
$city = 'Rjh'; | |
$country = ';kkk'; | |
printf(ecs_html__('my city is %1$s and my country is %2$s '), 'domein'), $city, $country ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<imput value='<?php echo esc_attr($name); ?>' | |
// обробити атрибут тега | |
'<?php echo esc_html($name); ?>' | |
// любий тег в текст переробляє | |
<a href="<?php echo esc_url(home_url('/')); ?>">link</a> | |
// esc_url() - link escape | |
$name = 'Імя - <a href="#">моє є Iceman, яке має <strong>стати </strong> особливим </a>'; | |
$arguments= array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body <?php body_class(); ?> > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test_customize_personal_register($wp_customize) { | |
$wp_customize->add_setting('test_link_color', array( | |
'default'=> '#f3f3f3', | |
'transport'=> 'refresh', | |
)); | |
// додаю контрол color picker | |
$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'test_link_color', | |
array( | |
'lqabel' => __('Header Color', 'domein'), | |
'section' => 'colors', // id секції, де будже разміщений контрол він існує за замовчуванням |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
register_default_headers( array( | |
'wheel' => array( | |
'url' => get_template_directory_uri().'/assets/img/header.jpg', | |
'thumbnail_url' => '%s/images/headers/wheel-thumbnail.jpg', | |
'description' => __( 'Wheel', 'twentyeleven' ) | |
), | |
'shore' => array( | |
'url' => '%s/images/headers/shore.jpg', | |
'thumbnail_url' => '%s/images/headers/shore-thumbnail.jpg', | |
'description' => __( 'Shore', 'twentyeleven' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args = array( | |
'default-color' => '0000ff', | |
'default-image' => get_template_directory_uri() . '/images/wapuu.jpg', | |
); | |
add_theme_support( 'custom-background', $args ); | |
add_theme_support( 'custom-background', array( | |
'default-color' => '0000ff', | |
'default-image' => get_template_directory_uri() . '/images/wapuu.jpg', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function themename_custom_logo_setup() { | |
$defaults = array( | |
'height' => 100, | |
'width' => 400, | |
'flex-height' => true,//не враховуе пропорції 1:4 | |
'flex-width' => true, | |
'header-text' => array( 'site-title', 'site-description' ), | |
'unlink-homepage-logo' => true, | |
); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test_add_admin_page() { | |
$hook_sufix = add_menu_page('Test Theme Option', 'Опції теми', 'manage_options', 'test-options', 'test_create_page', | |
'dashicons-admin-customizer', 81 ); | |
// test-options - слаг | |
// 'dashicons-admin-customizer' or get_template_directory_uri().'/assets/img/moon.png' | |
add_action("admin_print_scripts-{$hook_sufix}", "test_admin_styles"); | |
// визначаю фунцію, яка буде створювати поля опцій |