Improve WordPress security (.htaccess)
# Enable .htpasswd authentication
<If "%{HTTP_HOST} != 'dev'">
AuthType Basic
AuthName "Login to dashboard"
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) | |
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip) | |
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) |
#loader { | |
background: none repeat scroll 0 0 #ffffff; | |
bottom: 0; | |
height: 100%; | |
left: 0; | |
position: fixed; | |
right: 0; | |
top: 0; | |
width: 100%; | |
z-index: 9999; |
<?php | |
// Нужно добавить в functions.php -> require get_template_directory() . '/inc/customizer.php'; | |
// Функция, регистрирующая новые panel, sections и setting в Customizer | |
function yoursitename_new_customizer_settings($wp_customize) { | |
// Создать настройку логотипа | |
$wp_customize->add_setting('yoursitename_logo'); | |
// Добавить настройку логотипа в секцию "свойства сайта" | |
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'yoursitename_logo', |
<?php | |
// Добавить новую секцию | |
$wp_customize->add_section('themeName_sectionName', | |
array( | |
'title' => 'Название секции', | |
'priority' => 120, | |
) | |
); | |
Создать настройку | |
$wp_customize->add_setting('themeName_settingName'); |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<h1><?php the_title(); ?></h1> | |
<?php the_content(); ?> | |
<?php endwhile; else: ?> | |
<p>Извините, ничего не найдено.</p> | |
<?php endif; ?> |
$wp_customize->selective_refresh->add_partial($setting_1, array( | |
'selector' => '.contacts', | |
'render_callback' => function() use ($setting_1) { | |
return nl2br(get_theme_mod($setting_1)); | |
} | |
)); |
add_action('customize_register', 'dco_customize_register'); | |
function dco_customize_register($wp_customize) { | |
//FOOTER | |
$wp_customize->add_section('footer', array( | |
'title' => 'Подвал', | |
'priority' => 1, | |
)); | |
//footer text |
<?php | |
/** | |
* Plugin name: Site Title (and Tagline) Smilies | |
* Description: Demonstration of selective refresh in the Customizer. Selectors are targeting elements in Twenty Fifteen. | |
* Author: Weston Ruter, XWP | |
* Plugin URL: https://gist.github.com/westonruter/a15b99bdd07e6f4aae7a | |
* | |
* @package SiteTitleSmilies | |
*/ |
function prefix_customizer_register( $wp_customize ) { | |
$wp_customize->add_panel( 'panel_id', array( | |
'priority' => 10, | |
'capability' => 'edit_theme_options', | |
'theme_supports' => '', | |
'title' => __( 'Example Panel', 'textdomain' ), | |
'description' => __( 'Description of what this panel does.', 'textdomain' ), | |
) ); |