我正在使用wordpress的Meta Slider,而admin页面为滑块添加了两个选项:“Caption”和“URL”我想在字段中添加“Background Color”选项并拥有LI类从字段中调用背景颜色。我该怎么做
以下是字段所在滑块的php,如何以及在何处添加“背景颜色”选项。
https://gist.github.com/mihadaiko/7621697
我还要将什么添加到css中以便从后台字段调用?
答案 0 :(得分:0)
// localise the JS
wp_localize_script( 'metaslider-admin-script', 'metaslider', array(
'url' => __("URL", 'metaslider'),
'caption' => __("Caption", 'metaslider'),
/* ADD */'Background Color' => __("Background Color", 'metaslider'),
'new_window' => __("New Window", 'metaslider'),
'confirm' => __("Are you sure?", 'metaslider'),
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'resize_nonce' => wp_create_nonce('metaslider_resize'),
'iframeurl' => METASLIDER_BASE_URL . 'preview.php',
'useWithCaution' => __("Caution: This setting is for advanced developers only. If you're unsure, leave it checked.", 'metaslider')
));
也是第144行
* Media Manager iframe HTML
*/
public function iframe() {
wp_enqueue_style('metaslider-admin-styles', METASLIDER_ASSETS_URL . 'metaslider/admin.css', false, METASLIDER_VERSION);
wp_enqueue_script('google-font-api', 'http://fonts.googleapis.com/css?family=PT+Sans:400,700');
$link = apply_filters('metaslider_hoplink', 'http://www.metaslider.com/upgrade/');
$link .= '?utm_source=lite&utm_medium=more-slide-types&utm_campaign=pro';
echo "<div class='metaslider'>";
echo "<p style='text-align: center; font-size: 1.2em; margin-top: 50px;'>Get the Pro Addon pack to add support for: <b>Post Feed</b> Slides, <b>YouTube</b> Slides, <b>HTML</b> Slides & <b>Vimeo</b> Slides</p>";
echo "<p style='text-align: center; font-size: 1.2em;'><b>NEW: </b> Animated HTML <b>Layer</b> Slides (with an awesome Drag & Drop editor!)</p>";
echo "<p style='text-align: center; font-size: 1.2em;'><b></b> Live Theme Editor!</p>";
echo "<p style='text-align: center; font-size: 1.2em;'><b>NEW:</b> Thumbnail Navigation for Flex & Nivo Slider!</p>";
echo "<a class='probutton' href='{$link}' target='_blank'>Get <span class='logo'><strong>Meta</strong>Slider</span><span class='super'>Pro</span></a>";
echo "<span class='subtext'>Opens in a new window</span>";
echo "</div>";
}