Frank Bültge · Inpsyde GmbH, Juni 2015
Usage
Juni 2015
My biggest beef with WordPress commercial products is that they are not self-audited near enough from a UX / admin perspective.
— Brian Krogsgard (@Krogsgard) April 30, 2015
Abhängig von … aber einfach, schnell, bekannt.
Gute Gründe für den „richtigen“ Weg.
Der Customizer ist nur für Themes?
Gute Gründe für die Nutzung in Plugins.
WordPress Login
Customizing mit Hilfe des Customizer.
$login_url = wp_login_url();
$url = add_query_arg(
array(
// Load specific url
'url' => urlencode( $login_url ),
// Add a return url
'return' => admin_url( 'themes.php' ),
),
admin_url( 'customize.php' )
);
$wp_customize->remove_section( 'colors' );
add_filter( 'customize_control_active', '...', 10, 2 )
$capability = 'edit_theme_options';
$wp_customize->add_panel(
$panel,
array(
'title' => esc_attr__( 'Login Customizer', 'customize-login' ),
'description' => esc_attr__( 'Switch to this panel to customize the login screen', 'customize-login' ),
'priority' => 999,
'capability' => $capability,
)
);
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, $settings . '_background_color',
array(
'label' => esc_attr__( 'Background', 'login-customizer' ),
'section' => $section . '_login',
'settings' => $settings . '_background_color',
'active_callback' => 'my_background_color_callback',
)
)
);
$url = add_query_arg(
array(
// Pass to frontend the Customizer construct being deeplinked
'autofocus[section]' => 'static_front_page',
),
admin_url( 'customize.php' )
);
Beispiel auf GitHub.com
Für Menschen
Seien Sie begeistert und Sie werden begeistern.
Frank Bültge · Inpsyde GmbH
Illustrationen: Thies Schwarz Illustration