コード例 #1
0
ファイル: customizer.php プロジェクト: rthburke/fltHub
function extra_customizer_register_module_image_settings()
{
    return array('et_pb_image-animation' => array('label' => __('Animation', 'extra'), 'type' => 'select', 'sanitize_callback' => 'et_sanitize_image_animation', 'choices' => et_extra_image_animation_choices(), 'description' => __('This controls default direction of the lazy-loading animation.', 'extra'), 'value_bind' => array('style' => 'class_toggle', 'selector' => '.et_pb_image', 'class' => '_value_bind_to_value', 'format' => 'et_pb_animation_%value%')));
}
コード例 #2
0
ファイル: sanitization.php プロジェクト: rthburke/fltHub
/**
 * Sanitize image animation choices
 * @param string
 * @return string|bool
 */
function et_sanitize_image_animation($choosen)
{
    return et_sanitize_key_based_option($choosen, et_extra_image_animation_choices());
}