• Resolved yamatomooo

    (@yamatomooo)


    XO Sliderを使用させていただき、企業向けサイトを開発させていただいております。

    XO SliderのThumbnailテンプレートを使用し、商品ギャラリーのページ(記事)を作成しようと思うのですが、この際、XO Sliderのパラメーターのデフォルト値を強制的に設定することは可能でしょうか?

    ギャラリーの記事の作成は、あまりPCの知識が無い方が行われる為、できればXO Sliderでは画像の登録くらいにしてもらい、パラメーターは何も操作しない状態でXO Sliderのスライダーデータを登録(作成)するような運用を考えております。

    こういった場合、何か手段はございますでしょうか?
    ご教授いただければ幸いです。よろしくお願いいたします。

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ishitaka

    (@ishitaka)

    こんにちは

    パラメーターのデフォルト値は、default_post_metadata フィルターフックで変更できます。

    例)

    add_filter( 'default_post_metadata', function( $value, $object_id, $meta_key, $single, $meta_type ) {
    if ( 'parameters' === $meta_key && 'xo_liteslider' === get_post_type( $object_id ) ) {
    $value = array(
    'template' => 'thumbnail',
    'effect' => 'slide',
    'navigation' => true,
    'pagination' => true,
    'content' => true,
    'sort' => 'asc',
    'loop' => true,
    'speed' => 600,
    'auto_height' => false,
    'slides_per_group' => '',
    'slides_per_view' => '',
    'space_between' => '',
    'centered_slides' => true,
    'autoplay' => true,
    'delay' => 3000,
    'stop_on_last_slide' => false,
    'disable_on_interaction' => true,
    'thumbs_width' => '',
    'thumbs_height' => '',
    'thumbs_image_width' => 120,
    'thumbs_image_height' => 90,
    'thumbs_navigation' => false,
    'thumbs_per_view_type' => 'auto',
    'thumbs_per_view' => '',
    'thumbs_space_between' => '',
    'thumbs_margin_top' => '',
    'width' => '',
    'height' => '',
    );
    }
    return $value;
    }, 10, 5 );

    Thread Starter yamatomooo

    (@yamatomooo)

    早速のご回答、誠にありがとうございます!

    近日中に検証して、またご連絡させていただきます。

    ありがとうございます!

    Thread Starter yamatomooo

    (@yamatomooo)

    ishitaka

    ご教授いただきました内容で検証したところ、バッチリ設定できました!
    本当に助かりました。ありがとうございました。

    今後とも、よろしくお願いいたします!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘XO Sliderのパラメーターのデフォルト値を設定する方法’ is closed to new replies.