我看到" Background image not saving in WordPress Customizer" 但没有得到任何帮助。
我的代码是
<Button>
<StackPanel Orientation="Vertical">
<Image Source="/MyPath/Add.png"
Height="36"
Width="36"/>
<Label HorizontalAlignment="Center"
Content="My Button Text" />
</StackPanel>
</Button>
我尝试输出
command + s
和
function sorcey_customize_register($wp_customize){
$wp_customize->add_section('sorcey_footer', array(
'title' => __('Footer', 'sorcey'),
'description' => '',
'priority' => 120,
));
/* =============================
Footer logo
===============================*/
$wp_customize->add_setting('sorcey_footer_logo', array(
'default' => '',
'capability' => 'edit_theme_options',
'type' => 'text',
));
$wp_customize->add_control( new WP_Customize_Cropped_Image_Control(
$wp_customize, 'sorcey_footer_logo_ctrl', array(
'label' => __( 'Footer Logo', 'sorcey' ),
'section' => 'sorcey_footer',
'settings' => 'sorcey_footer_logo',
'height' => '40px',
'width' => '160px',
'button_labels' => array(
'select' => __( 'Select logo' ),
'change' => __( 'Change logo' ),
'remove' => __( 'Remove' ),
'default' => __( 'Default' ),
'placeholder' => __( 'No logo selected' ),
'frame_title' => __( 'Select logo' ),
'frame_button' => __( 'Choose logo' ),
),
)
));
}
和
echo get_theme_mod( 'sorcey_footer_logo' );
但显示&#39;布尔值假&#39;