当前位置: 首页>>代码示例>>PHP>>正文


PHP op_mod函数代码示例

本文整理汇总了PHP中op_mod函数的典型用法代码示例。如果您正苦于以下问题:PHP op_mod函数的具体用法?PHP op_mod怎么用?PHP op_mod使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了op_mod函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_options

 function get_options()
 {
     //$content_fields = op_optin_default_fields();
     $fields = array('title' => array('name' => __('Title', 'optimizepress'), 'help' => __('Enter the title to be displayed at the top of the content area', 'optimizepress'), 'default' => __('The perfect way to convert your traffic into sales', 'optimizepress')), 'paragraph' => array('name' => __('Content', 'optimizepress'), 'help' => __('Enter the sub title/message text above your submit button', 'optimizepress'), 'type' => 'wysiwyg', 'default' => __('Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.<br />Epsum factorial non deposit quid pro quo hic escorol. Olypian quarrels et gorilla congolium sic ad nauseum.', 'optimizepress'), 'disable_font' => true), 'submit_button' => array('name' => __('Submit Button', 'optimizepress'), 'help' => __('Enter the text for the button on your feature area', 'optimizepress'), 'default' => __('Take The Tour...', 'optimizepress'), 'disable_font' => true), 'link_url' => array('name' => __('Button Link URL', 'optimizepress'), 'disable_font' => true));
     $img_fields = array('image' => array('name' => __('Image', 'optimizepress'), 'help' => __('Enter the URL to the image', 'optimizepress'), 'default' => '', 'type' => 'image', 'disable_font' => true));
     $vid_opts = array('values' => array('type' => 'video', 'width' => '580', 'height' => '325'));
     $styles = array(1 => array('content' => array('module' => 'content_fields', 'title' => __('Content', 'optimizepress'), 'mod_options' => array('fields' => $fields), 'template' => array($this, 'content_fields'), 'before' => '<div class="twelve columns">', 'after' => '</div>'), 'image' => array('module' => 'content_fields', 'mod_options' => array('fields' => $img_fields), 'template' => array($this, 'content_fields'), 'before' => '<div class="twelve featured-image columns">', 'after' => '</div>')), 2 => array('content' => array('module' => 'content_fields', 'mod_options' => array('fields' => $fields), 'before' => '<div class="nine columns">', 'after' => '</div>'), 'video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div class="fifteen columns video-panel">', 'after' => '</div>')), 3 => array('optin' => array('module' => 'signup_form', 'before' => '<div class="nine columns">', 'after' => '</div>'), 'image' => array('module' => 'content_fields', 'mod_options' => array('fields' => $img_fields), 'before' => '<div class="twelve columns featured-image offset-by-two">', 'after' => '</div>')), 4 => array('optin' => array('module' => 'signup_form', 'before' => '<div class="nine columns">', 'after' => '</div>'), 'video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div class="fifteen columns video-panel">', 'after' => '</div>')), 5 => array('image' => array('module' => 'content_fields', 'mod_options' => array('fields' => $img_fields), 'before' => '<div class="twelve featured-image columns">', 'after' => '</div>'), 'content' => array('module' => 'content_fields', 'mod_options' => array('fields' => $fields), 'before' => '<div class="twelve columns">', 'after' => '</div>')), 6 => array('video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div class="fifteen columns video-panel">', 'after' => '</div>'), 'content' => array('module' => 'content_fields', 'mod_options' => array('fields' => $fields), 'before' => '<div class="nine columns">', 'after' => '</div>')), 7 => array('image' => array('module' => 'content_fields', 'mod_options' => array('fields' => $img_fields), 'before' => '<div class="twelve columns featured-image">', 'after' => '</div>'), 'optin' => array('module' => 'signup_form', 'before' => '<div class="nine columns offset-by-two">', 'after' => '</div>')), 8 => array('video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div class="fifteen columns video-panel">', 'after' => '</div>'), 'optin' => array('module' => 'signup_form', 'before' => '<div class="nine columns">', 'after' => '</div>')), 9 => array('content' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('title' => array('name' => __('Title', 'optimizepress'), 'help' => __('Enter the title to be displayed at the top of the content area', 'optimizepress'), 'default' => __('The perfect way to convert your traffic into sales', 'optimizepress')), 'subtitle' => array('name' => __('Sub Title', 'optimizepress'), 'help' => __('Enter the sub title to be displayed at the top of the content area', 'optimizepress'), 'default' => __('The perfect way to convert your traffic into sales', 'optimizepress'))))), 'image' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('image' => array('name' => __('Image', 'optimizepress'), 'help' => __('Enter the URL to the image', 'optimizepress'), 'default' => OP_PAGES_URL . 'global/images/marketing-sites/screenies.png', 'type' => 'image', 'disable_font' => true))))), 10 => array('content' => array('module' => 'content_fields', 'mod_options' => array('fields' => $fields))), 11 => array('content_large' => array('module' => 'live_editor', 'module_type' => 'page')));
     //1,6,2,7,3,8,4,9,5,10
     $this->options = isset($styles[$this->style]) ? $styles[$this->style] : array();
     if ($this->style != 11) {
         $this->options = array_merge(array('liveeditor_above' => array('module' => 'live_editor', 'module_type' => 'page')), $this->options, array('liveeditor_below' => array('module' => 'live_editor', 'module_type' => 'page')));
     }
     foreach ($this->options as $name => $options) {
         op_mod($options['module'], op_get_var($options, 'module_type', 'blog'));
         if (!isset($options['template'])) {
             if ($this->options[$name]['module'] == 'content_fields') {
                 $this->options[$name]['template'] = array($this, 'content_fields');
             } elseif ($this->options[$name]['module'] == 'signup_form') {
                 $this->options[$name]['template'] = array($this, 'optin_box');
                 $this->options[$name]['mod_options'] = array('disable' => 'color_scheme', 'content_fields' => op_optin_default_fields());
                 $this->options[$name]['mod_options']['submit_button_config'] = array('defaults' => array('content' => __('Get Started', 'optimizepress')));
             } elseif ($this->options[$name]['module'] == 'video') {
                 $this->options[$name]['template'] = array($this, 'video_placeholder');
             }
         }
     }
 }
开发者ID:kyscastellanos,项目名称:arepa,代码行数:27,代码来源:marketing.php

示例2: content_template_fb

    function content_template_fb($fields, $values)
    {
        $fonts = array('title' => array(), 'content' => array());
        if (isset($values[0])) {
            $fonts = $values[1];
            $values = $values[0];
        }
        //op_font_style_str
        $html = '';
        op_mod('comments')->need_js = true;
        $button_1 = op_get_var($values, 'button_1_text');
        $button_2 = op_get_var($values, 'button_2_text');
        $title = op_get_var($values, 'title');
        $font_str = op_font_style_str(op_get_var($fonts, 'title', array()));
        $html .= empty($title) ? '' : '<h2' . (!empty($font_str) ? ' style=\'' . $font_str . '\'' : '') . '>' . nl2br($title) . '</h2>
		';
        $content = wpautop(op_get_var($values, 'content'));
        $font_str = op_font_style_str(op_get_var($fonts, 'content', array()));
        $GLOBALS['OP_LIVEEDITOR_FONT_STR'] = array('elements' => array('p', 'a'), 'style_str' => $font_str);
        $content = op_process_asset_content($content);
        $html .= $content . (empty($button_1) ? '' : '
		<a class="button-style-2 button-style-2-orange" href="' . op_get_var($values, 'button_1_url') . '"><span>' . $button_1 . '</span></a>') . (empty($button_2) ? '' : '
		<a class="button-style-2 button-style-2-orange" href="' . op_get_var($values, 'button_2_url') . '"><span>' . $button_2 . '</span></a>');
        return $html;
    }
开发者ID:kyscastellanos,项目名称:arepa,代码行数:25,代码来源:landing.php

示例3: get_options

 function get_options()
 {
     //$content_fields = op_optin_default_fields();
     $vid_opts = array('values' => array('type' => 'video', 'width' => '540', 'height' => '350'));
     op_mod('signup_form');
     $style = array('title_logo' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('title' => array('name' => __('Logo', 'optimizepress'), 'default' => $this->global_imgs . 'logo_default.png', 'element' => 'h1', 'type' => 'image'))), 'template' => array($this, 'content_fields')), 'content' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('title' => array('name' => __('Title', 'optimizepress'), 'default' => __('Discover How You Can Build Pages Just Like This In Seconds...', 'optimizepress')), 'content' => array('name' => __('Content', 'optimizepress'), 'default' => __('Your high impact sub-headline or call to action text would be placed here.  Enter your name and email below for instant access', 'optimizepress'), 'type' => 'wysiwyg', 'disable_font' => true))), 'before' => '<div>', 'after' => '</div>', 'template' => array($this, 'content_fields')), 'optin' => array('module' => 'signup_form', 'mod_options' => array('disable' => array('color_scheme'), 'ignore_fields' => array('title', 'form_header', 'footer_note'), 'content_fields' => op_optin_default_fields(), 'submit_button_config' => array('defaults' => array('content' => __('Get Started', 'optimizepress')))), 'template' => array($this, 'optin_box'), 'before' => '<div>', 'after' => '</div>'), 'footer_note' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('footer_note' => array('name' => __('Footer Note', 'optimizepress'), 'default' => __('We value your privacy. Your information will never be shared or sold.', 'optimizepress'), 'wrap' => '<p class="secure-icon"><img src="' . op_page_img('secure.png', true, 'global') . '" alt="secure" width="16" height="15"> %s</p>'))), 'template' => array($this, 'content_fields')), 'template' => array($this, 'style_template'));
     //1,6,2,7,3,8,4,9,5,10
     $this->options = $style;
 }
开发者ID:kyscastellanos,项目名称:arepa,代码行数:9,代码来源:feature_area.php

示例4: widget

 function widget($args, $instance)
 {
     @session_start();
     $theme = isset($_SESSION['theme']) ? $_SESSION['theme'] : 1;
     $grid = op_mod('advertising')->display(array('advertising', 'sidebar', 'grid'), true);
     $rectangular = op_mod('advertising')->display(array('advertising', 'sidebar', 'rectangular'), true);
     if ($grid != '' || $rectangular != '') {
         ?>
     <div class="sidebar-section">
         <?php 
         echo $grid . $rectangular;
         ?>
     </div>
 <?php 
     }
     op_mod('advertising')->display(array('advertising', 'sidebar', 'large_ad1'));
     call_user_func('theme' . $theme . '_generate_sidebar_tabs');
     op_mod('advertising')->display(array('advertising', 'sidebar', 'large_ad2'));
     call_user_func('theme' . $theme . '_generate_sidebar_tabs', 2);
 }
开发者ID:kyscastellanos,项目名称:arepa,代码行数:20,代码来源:op_SidebarAdvertisingWidget.php

示例5: video_player

 static function video_player($atts, $content = '')
 {
     // Decode encoded chars
     $atts = op_urldecode($atts);
     $default = array('type' => 'embed', 'hide_controls' => 'N', 'auto_play' => 'N', 'auto_buffer' => 'N', 'width' => 511, 'height' => 288, 'margin_top' => 0, 'margin_bottom' => 20, 'border_size' => 0, 'border_color' => '#fff', 'placeholder' => '', 'align' => 'center', 'youtube_url' => '', 'youtube_auto_play' => 'N', 'youtube_hide_controls' => 'N', 'youtube_remove_logo' => 'N', 'youtube_show_title_bar' => 'N', 'youtube_force_hd' => '', 'url1' => '', 'url2' => '', 'new_syntax' => true);
     $vars = shortcode_atts($default, $atts);
     if ($vars['type'] == 'embed') {
         if (preg_match('{alt=\\"(.*?)\\"}si', $content, $match)) {
             $content = base64_decode(html_entity_decode($match[1], ENT_QUOTES, get_option('blog_charset')));
             if (stripos($content, 'id="evp-') !== false) {
                 $content = preg_replace('{<!--\\s+_evpInit}si', "<!--\n_evpInit", $content);
             }
         }
         $vars['embed'] = $content;
     } elseif ($vars['type'] == 'youtube') {
         $content = base64_decode($content);
         if (preg_match('|(https?://[^<"]+)|im', $content, $matches)) {
             $vars['youtube_url'] = $matches[1];
         }
     } else {
         $vars['url'] = '';
         $content = base64_decode($content);
         if (preg_match('|(https?://[^<"]+)|im', $content, $matches)) {
             $vars['url'] = $matches[1];
         }
         /*
          * Video URL 1
          */
         $vars['url1'] = '';
         $url1 = base64_decode($atts['url1']);
         if (preg_match('|(https?://[^<"]+)|im', $url1, $matches)) {
             $vars['url1'] = $matches[1];
         }
         /*
          * Video URL 2
          */
         $vars['url2'] = '';
         $url2 = base64_decode($atts['url2']);
         if (preg_match('|(https?://[^<"]+)|im', $url2, $matches)) {
             $vars['url2'] = $matches[1];
         }
     }
     /**
      * Loading video player script
      */
     op_video_player_script();
     $output = op_mod('video')->output(array(), array(), $vars, true, true);
     if (!is_admin()) {
         return $output['output'];
     }
     if (count($vars) == 0) {
         $vars = array('width' => $default['values']['width'], 'height' => $default['values']['height'], 'border_size' => $default['values']['border_size'], 'border_color' => $default['values']['border_color']);
     }
     if (empty($vars['width']) && isset($default['values']) && isset($default['values']['width'])) {
         $vars['width'] = $default['values']['width'];
     }
     if (empty($vars['height']) && isset($default['values']) && isset($default['values']['height'])) {
         $vars['height'] = $default['values']['height'];
     }
     if (empty($vars['border_size']) && isset($default['values']) && isset($default['values']['border_size'])) {
         $vars['border_size'] = $default['values']['border_size'];
     }
     if (empty($vars['border_color']) && isset($default['values']) && isset($default['values']['border_color'])) {
         $vars['border_color'] = $default['values']['border_color'];
     }
     $align = $vars['align'] == 'center' ? 'margin:0 auto;' : 'float:' . $vars['align'] . ';';
     // This ifelse can be removed for production, it's unnecessary, new syntax will always be present.
     if ($vars['new_syntax']) {
         $video_aspect_ratio = $vars['height'] / $vars['width'];
         $aspect_ratio_string = 'height:0; padding-bottom:' . $video_aspect_ratio * 100 . '%; padding-top:0;';
         $output = '<div class="video-plugin-new-syntax video-plugin-new" style="width:' . $vars['width'] . 'px; max-width:100%;' . $align . (!empty($vars['margin_top']) ? ' margin-top: ' . $vars['margin_top'] . 'px;' : '') . (!empty($vars['margin_bottom']) ? ' margin-bottom: ' . $vars['margin_bottom'] . 'px;' : 'margin-bottom: 20px;') . (' border: ' . $vars['border_size'] . 'px solid ' . $vars['border_color'] . ';') . ' padding-top:0; padding-bottom:0;">' . '<div style="' . $aspect_ratio_string . '"></div>' . '</div>';
     } else {
         $output = '<div class="video-plugin" style="width:' . $vars['width'] . 'px;height:' . $vars['height'] . 'px;' . $align . (!empty($vars['margin_top']) ? ' margin-top: ' . $vars['margin_top'] . 'px;' : '') . (!empty($vars['margin_bottom']) ? ' margin-bottom: ' . $vars['margin_bottom'] . 'px;' : 'margin-bottom: 20px;') . (' border: ' . $vars['border_size'] . 'px solid ' . $vars['border_color'] . ';') . '"></div>';
     }
     return $output;
 }
开发者ID:JalpMi,项目名称:v2contact,代码行数:76,代码来源:default.php

示例6: op_page_attr

?>
[type]" id="<?php 
echo $fieldid;
?>
type" class="op-type-switcher">
        <?php 
$val = op_page_attr($section_name, 'type');
$opts = array('optin' => __('Opt-in Form', OP_SN), 'html' => __('HTML Content', OP_SN));
foreach ($opts as $name => $title) {
    echo '<option value="' . $name . '"' . ($val == $name ? ' selected="selected"' : '') . '>' . $title . '</option>';
}
?>
        </select><br />
        <div class="op-type op-type-optin"><?php 
op_mod('signup_form')->display_settings(array($section_name, 'optin_form'), array('disable' => 'color_scheme|on_off_switch'));
?>
</div>
        <div class="op-type op-type-html"><br /><?php 
op_mod('content_fields')->display_settings(array($section_name, 'html_content'), array('fields' => array('content' => array('name' => __('HTML Content', OP_SN), 'type' => 'textarea', 'help' => __('Enter HTML content to show in your lightbox.', OP_SN)))));
?>
</div>
    </div>
    <br />
    <div id="popdom-promote-box">
    	<p><?php 
printf(__('For more advanced Popup designs, split testing and many more features, we recommend Popup Domination. <a href="%s" target="_blank">Click here</a>', OP_SN), 'http://gurucb.popdom.hop.clickbank.net/');
?>
</p>
    </div>
    
</div>
开发者ID:denis-chmel,项目名称:wordpress,代码行数:31,代码来源:settings.php

示例7: save_settings

 function save_settings($section_name, $config = array(), $op, $return = false)
 {
     $settings = array('enabled' => op_get_var($op, 'enabled', 'N'), 'show_on' => op_get_var($op, 'show_on', 'load'), 'type' => op_get_var($op, 'type', 'html'), 'optin_form' => op_mod('signup_form')->save_settings(array($section_name, 'optin_form'), array('disable' => 'color_scheme|on_off_switch'), op_get_var($op, 'optin_form', array()), true), 'html_content' => op_mod('content_fields')->save_settings(array($section_name, 'html_content'), array('fields' => array('content' => array('type' => 'textarea'))), op_get_var($op, 'html_content', array()), true));
     op_update_page_option($section_name, $settings);
 }
开发者ID:kyscastellanos,项目名称:arepa,代码行数:5,代码来源:lightbox.php

示例8: _e

    ?>
            <?php 
} else {
    ?>
                <h2 class="the-title"><?php 
    _e('Nothing Found', OP_SN);
    ?>
</h2>
                <?php 
    op_mod('advertising')->display(array('advertising', 'pages', 'top'));
    ?>
                <p><?php 
    _e('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', OP_SN);
    ?>
</p>
                <?php 
    op_search_form();
    ?>
            <?php 
}
?>
                <?php 
op_mod('advertising')->display(array('advertising', 'pages', 'bottom'));
?>
            </div>
            <?php 
op_sidebar();
?>

<?php 
get_footer();
开发者ID:JalpMi,项目名称:v2contact,代码行数:31,代码来源:search.php

示例9: call_user_func

    }
    echo $help_vid;
    ?>
			</div>
		</div>
        <?php 
    if (!$no_content) {
        ?>
			<?php 
        if (!empty($help)) {
            ?>
            <div class="section-help"><?php 
            echo $help;
            ?>
</div>
            <?php 
        }
        if (!empty($cur_action)) {
            call_user_func($cur_action);
        }
        if (!empty($cur_module)) {
            op_mod($cur_module, $module_type)->display_settings($name, $options);
        }
        ?>
        <?php 
    }
    ?>
    </div>
    <?php 
    $i++;
}
开发者ID:shahadat014,项目名称:geleyi,代码行数:31,代码来源:helper.php

示例10: video_player

 function video_player($atts, $content = '')
 {
     $default = array('type' => 'embed', 'hide_controls' => 'N', 'auto_play' => 'N', 'auto_buffer' => 'N', 'width' => 511, 'height' => 288, 'margin_top' => 0, 'margin_bottom' => 20, 'border_size' => 0, 'border_color' => '#fff', 'placeholder' => '', 'align' => 'center', 'youtube_url' => '', 'youtube_auto_play' => 'N', 'youtube_hide_controls' => 'N', 'youtube_remove_logo' => 'N', 'youtube_show_title_bar' => 'N', 'youtube_force_hd' => '');
     $vars = shortcode_atts($default, $atts);
     if ($vars['type'] == 'embed') {
         if (preg_match('{alt=\\"(.*?)\\"}si', $content, $match)) {
             $content = base64_decode(html_entity_decode($match[1], ENT_QUOTES, get_option('blog_charset')));
             if (stripos($content, 'id="evp-') !== false) {
                 $content = preg_replace('{<!--\\s+_evpInit}si', "<!--\n_evpInit", $content);
             }
         }
         $vars['embed'] = $content;
     } elseif ($vars['type'] == 'youtube') {
         $content = base64_decode($content);
         if (preg_match('|(https?://[^<"]+)|im', $content, $matches)) {
             $vars['youtube_url'] = $matches[1];
         }
     } else {
         $vars['url'] = '';
         $content = base64_decode($content);
         if (preg_match('|(https?://[^<"]+)|im', $content, $matches)) {
             $vars['url'] = $matches[1];
         }
     }
     $output = op_mod('video')->output(array(), array(), $vars, true, true);
     if (!is_admin()) {
         return $output['output'];
     }
     if (count($vars) == 0) {
         $vars = array('width' => $default['values']['width'], 'height' => $default['values']['height'], 'border_size' => $default['values']['border_size'], 'border_color' => $default['values']['border_color']);
     }
     if (empty($vars['width']) && isset($default['values']) && isset($default['values']['width'])) {
         $vars['width'] = $default['values']['width'];
     }
     if (empty($vars['height']) && isset($default['values']) && isset($default['values']['height'])) {
         $vars['height'] = $default['values']['height'];
     }
     if (empty($vars['border_size']) && isset($default['values']) && isset($default['values']['border_size'])) {
         $vars['border_size'] = $default['values']['border_size'];
     }
     if (empty($vars['border_color']) && isset($default['values']) && isset($default['values']['border_color'])) {
         $vars['border_color'] = $default['values']['border_color'];
     }
     $align = $vars['align'] == 'center' ? 'margin:0 auto;' : 'float:' . $vars['align'] . ';';
     $output = '<div class="video-plugin" style="width:' . $vars['width'] . 'px;height:' . $vars['height'] . 'px;' . $align . (!empty($vars['margin_top']) ? ' margin-top: ' . $vars['margin_top'] . 'px;' : '') . (!empty($vars['margin_bottom']) ? ' margin-bottom: ' . $vars['margin_bottom'] . 'px;' : 'margin-bottom: 20px;') . (' border: ' . $vars['border_size'] . 'px solid ' . $vars['border_color'] . ';') . '"></div>';
     return $output;
 }
开发者ID:shahadat014,项目名称:geleyi,代码行数:47,代码来源:default.php

示例11: output

 function output($section_name, $config, $options, $return = false)
 {
     $styles = $this->_get_styles($section_name, $config);
     $type = op_get_var($options, 'type');
     $before = op_get_var($config, 'before');
     $after = op_get_var($config, 'after');
     if (!empty($type) && isset($styles[$type]) && isset($options[$type])) {
         $style = $styles[$type];
         if (isset($style['config'])) {
             extract($style['config']);
         }
         $options = $options[$type];
         $content_done = $button_done = false;
         $content_options = array();
         array_push($section_name, $type);
         $feature_content = array();
         $used_content = $used_button = '';
         foreach ($style['options'] as $option_name => $option) {
             $tmp_content = '';
             if (isset($option['display_action'])) {
                 $tmp_content = call_user_func_array($option['display_action'], array($section_name, $config));
             } elseif (isset($option['module'])) {
                 $mod_config = op_get_var($option, 'mod_options', array());
                 $mod_options = op_get_var($options, $option_name, array());
                 if (isset($option['use_content']) && isset($style['options'][$option['use_content']])) {
                     $used_content = $option['use_content'];
                     $content_config = op_get_var($style['options'][$option['use_content']], 'mod_options', array());
                     $content_opts = op_get_var($options, $option['use_content'], array());
                     $content_options = op_mod('content_fields')->output(array($section_name, $option['use_content']), $content_config, $content_opts, true);
                     $mod_config['content_fields'] = op_get_var($content_config, 'fields', array());
                     if (isset($mod_config['disable'])) {
                         $mod_config['disable'] = str_replace('content', '', $mod_config['disable']);
                     }
                     $content_done = true;
                     $mod_options['content'] = $content_options;
                 }
                 if (isset($option['use_button']) && isset($style['options'][$option['use_button']])) {
                     $used_button = $option['use_button'];
                     $button_opts = op_get_var($options, $used_button, array());
                     $button_done = true;
                     $mod_options['submit_button'] = op_mod('submit_button')->output(array($section_name, $used_button), array(), $button_opts, true);
                 }
                 if (!($option_name == $used_content && $content_done === true) && !($option_name == $used_button && $button_done === true)) {
                     $tmp_content = op_mod($option['module'])->output(array($section_name, $option_name), $mod_config, $mod_options, true);
                     $content = '';
                     if (is_array($tmp_content)) {
                         if (count($tmp_content) > 0) {
                             if ($option['module'] == 'content_fields') {
                                 $tmp_content = array('content' => $tmp_content);
                             }
                             if (isset($option['template'])) {
                                 if (is_array($option['template'])) {
                                     if (is_object($option['template'][0])) {
                                         if (is_callable($option['template'])) {
                                             $content = call_user_func_array($option['template'], array($tmp_content));
                                         }
                                     } else {
                                         $content = op_tpl($option['template'][0], $tmp_content, $option['template'][1]);
                                     }
                                 } else {
                                     if (is_callable($option['template'])) {
                                         $content = call_user_func_array($option['template'], array($tmp_content));
                                     } else {
                                         $content = $this->load_tpl('output/' . $option['template'], $tmp_content);
                                     }
                                 }
                             } else {
                                 $content = $this->load_tpl('output/' . $option['module'], $tmp_content);
                             }
                         }
                     } else {
                         $content = $tmp_content;
                     }
                     $feature_content[] = $content;
                 }
             }
         }
         $out = $before . implode('', $feature_content) . $after;
         if ($return) {
             return $out;
         }
         echo $out;
     }
 }
开发者ID:shahadat014,项目名称:geleyi,代码行数:84,代码来源:feature_area.php

示例12: op_pagination



                <?php 
        op_pagination();
        ?>


            </ul>


            <?php 
    }
}
?>
                    <?php 
op_mod('advertising')->display(array('advertising', 'home_page', 'bottom'));
?>
                    </div> <!-- end bloque-list -->
                <?php 
//op_sidebar()
?>



        </div>

        
    </div>

<?php 
get_footer();
开发者ID:JalpMi,项目名称:v2contact,代码行数:29,代码来源:home.php

示例13: get_options

 function get_options($style)
 {
     //$content_fields = op_optin_default_fields();
     $vid_opts = array(array('values' => array('type' => 'video', 'width' => '540', 'height' => '350')), array('values' => array('type' => 'video', 'width' => '340', 'height' => '200')));
     $big_content = 'YToxOntpOjA7YToyOntzOjk6InJvd19jbGFzcyI7czozODoicm93IG9uZS1jb2wgZml4ZWQtd2lkdGggY2YgdWktc29ydGFibGUiO3M6NzoiY29sdW1ucyI7YToxOntpOjA7YToyOntzOjk6ImNvbF9jbGFzcyI7czo4OiJvbmUgY29scyI7czo4OiJlbGVtZW50cyI7YTo0OntpOjA7czoxMDU6IltoZWFkbGluZSBzdHlsZT1cIjE1XCIgYWxpZ249XCJjZW50ZXJcIl1IZXJlXCdzIGEgU2FtcGxlIEludGVybmV0IE1hcmtldGluZyBTdHlsZSBTcXVlZXplIFBhZ2VbL2hlYWRsaW5lXSI7aToxO3M6MjE4OiJbaGVhZGxpbmUgc3R5bGU9XCIxXCIgZm9udF9zaXplPVwiNDBcIiBmb250X2ZvbnQ9XCJBcmlhbFwiIGZvbnRfc3R5bGU9XCJib2xkXCIgZm9udF9jb2xvcj1cIiNDQjJEMDdcIiBhbGlnbj1cImNlbnRlclwiXUdldCBGcmVlLCBJbnN0YW50IEFjY2VzcyB0byB0aGUgVG9wIEZvdXIgQ2xpZW50LUdldHRpbmcgU3lzdGVtcyBmb3IgUGVyc29uYWwgVHJhaW5lcnPigKZbL2hlYWRsaW5lXSI7aToyO3M6MjE6IltkaXZpZGVyIHN0eWxlPVwiN1wiXSI7aTozO3M6NDU1OiJbdGV4dF9ibG9jayBzdHlsZT1cInN0eWxlXzEucG5nXCIgYWxpZ249XCJsZWZ0XCIgd2lkdGg9XCI1NDBcIl08c3Ryb25nPkdldCB0aGUgIyAxIEZBU1RFU1Qgd2F5IHRvIGdldHRpbmcgYWxsIHRoZSBmaXRuZXNzIGNsaWVudHMgeW91IGNhbiBoYW5kbGUgd2l0aG91dCBzcGVuZGluZyBhIGRpbWUgb24gYWR2ZXJ0aXNpbmcuPC9zdHJvbmc+DQoNCkhpIEknbSBCZWRyb3MgS2V1aWxpYW4sIHRoYXQncyBtZSBpbiB0aGUgcGljdHVyZSwgYW5kIHRoZSB2aWRlbyB5b3UncmUgYWJvdXQgdG8gd2F0Y2ggaXMgZnJvbSBteSAkMSwwMDAgcGVyIHBlcnNvbiBmaXRuZXNzIGJ1c2luZXNzLg0KDQpQbHVzLCBJJ2xsIGVtYWlsIHlvdSBteSB3ZWVrbHkgUFQgUHJvZml0cyBOZXdzbGV0dGVyIHBhY2tlZCB3aXRoIGN1dHRpbmcgZWRnZSBpZGVhcywgdGFjdGljcywgYW5kIHN0cmF0ZWdpZXMuWy90ZXh0X2Jsb2NrXSI7fX19fX0=';
     $default_title = __('Get Free, Instant Access to the Top Four Client-Getting Systems for Personal Trainers&hellip;', OP_SN);
     $default_title2 = __('Get Free, Instant Access to the Top Four Client-Getting Systems for Personal Trainers&hellip;', OP_SN);
     $default_subtitle = __('Get the # 1 FASTEST way to getting all the fitness clients you can handle without spending a dime on advertising.', OP_SN);
     $default_content = __('Hi I\'m Bedros Keuilian, that\'s me in the picture, and the video you\'re about to watch is from my $1,000 per person fitness business. Plus, I\'ll email you my weekly PT Profits Newsletter packed with cutting edge ideas, tactics, and strategies.', OP_SN);
     $default_content_2 = __('Hi I\'m Bedros Keuilian, that\'s me in the picture, and the video you\'re about to watch is from my $1,000 per person fitness business. Plus, I\'ll email you my weekly PT Profits Newsletter packed with cutting edge ideas, tactics, and strategies.', OP_SN);
     $optin_fields = array('title' => array('name' => __('Title', OP_SN), 'help' => __('Enter a title to be displayed above your optin form', OP_SN), 'default' => __('Sell Anything With OptimizePress', OP_SN)), 'subtitle' => array('name' => __('Sub Title', OP_SN), 'help' => __('Enter a sub title to be displayed above your optin form', OP_SN), 'default' => __('Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.', OP_SN)), 'form_header' => array('name' => __('Form Header', OP_SN), 'help' => __('Enter a call to action for your form - tell the visitor what to do (e.g. Complete the form below&hellip;)', OP_SN), 'default' => __('Get This Report Now Free', OP_SN)), 'footer_note' => array('name' => __('Footer Security Note', OP_SN), 'help' => __('Enter your security or spam notice here to reassure your visitors their details will be safe with you', OP_SN), 'default' => __('Your information is 100% secure with us and will never be shared', OP_SN)), 'name_default' => array('name' => __('Name Default Value', OP_SN), 'help' => __('Enter the default text for the Name input field', OP_SN), 'default' => __('Enter Your Name...', OP_SN)), 'email_default' => array('name' => __('Email Default Value', OP_SN), 'help' => __('Enter the default text for the Email input field', OP_SN), 'default' => __('Enter Your Email...', OP_SN)));
     $content = array('title' => array('fields' => array('title' => array('type' => 'wysiwyg', 'name' => __('Title', OP_SN), 'default' => $default_title, 'unautop' => true))), 'title2' => array('fields' => array('title' => array('name' => __('Title', OP_SN), 'default' => $default_title2, 'element' => 'h1', 'type' => 'wysiwyg', 'unautop' => true))), 'title3' => array('fields' => array('title' => array('name' => __('Title', OP_SN), 'default' => $default_title2, 'element' => 'h2'))), 'subtitle' => array('fields' => array('subtitle' => array('name' => __('Sub Title', OP_SN), 'default' => $default_title2))), 'content' => array('fields' => array('content' => array('name' => __('Content', OP_SN), 'type' => 'wysiwyg', 'default' => $default_content_2, 'disable_font' => true))), 'image' => array('fields' => array('image' => array('type' => 'image', 'name' => __('Image File', OP_SN), 'default' => 'http://placehold.it/300x320', 'disable_font' => true))), 'arrow_text' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('title' => array('name' => __('Title', OP_SN), 'default' => __('Get Free Access Now', OP_SN), 'element' => 'h3'))), 'after_element' => '<img src="' . $this->global_imgs . 'featured-panel/free-access-now-red-arrows.png" alt="" width="209" height="92" />', 'before' => '<div class="get-access-now">', 'after' => '</div>'));
     $styles = array('A' => array('title' => array('module' => 'content_fields', 'mod_options' => $content['title'], 'before' => '<div class="twentyfour columns">', 'after' => '</div>'), 'video' => array('module' => 'video', 'mod_options' => $vid_opts[0], 'before' => '<div class="fifteen columns">', 'after' => '</div>'), 'content' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('subtitle' => array('default' => $default_subtitle, 'name' => __('Title', OP_SN)), 'content' => array('type' => 'wysiwyg', 'default' => $default_content, 'name' => __('Content', OP_SN), 'disable_font' => true))), 'before' => '<div class="nine columns">', 'after' => '</div>'), 'optin' => array('module' => 'signup_form', 'before' => '<div class="twenty columns offset-by-two">', 'after' => '</div>', 'mod_options' => array('disable_name' => true, 'ignore_fields' => array('title', 'form_header', 'name_default')))), 'B' => array('title' => array('module' => 'content_fields', 'mod_options' => $content['title'], 'before' => '<div class="twentyfour columns">', 'after' => '</div>'), 'video' => array('module' => 'video', 'mod_options' => $vid_opts[0], 'before' => '<div class="fourteen columns">', 'after' => '</div>'), 'optin' => array('module' => 'signup_form', 'before' => '<div class="nine columns offset-by-one">', 'after' => '</div>')), 'C' => array('title' => array('module' => 'content_fields', 'mod_options' => $content['title'], 'before' => '<div class="twentyfour columns">', 'after' => '</div>'), 'video' => array('module' => 'video', 'mod_options' => $vid_opts[0], 'before' => '<div class="fifteen columns">', 'after' => '</div>'), 'content' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('subtitle' => array('default' => $default_subtitle, 'name' => __('Title', OP_SN)), 'content' => array('type' => 'wysiwyg', 'default' => $default_content_2, 'name' => __('Content', OP_SN), 'disable_font' => true))), 'before' => '<div class="nine columns">', 'after' => '</div>'), 'optin' => array('module' => 'signup_form', 'mod_options' => array('ignore_fields' => array('title', 'form_header')), 'before' => '<div class="twentyfour columns">', 'after' => '</div>')), 'D' => array('content' => array('module' => 'live_editor', 'module_type' => 'page', 'mod_options' => array('one_col' => true, 'default_layout' => $big_content), 'before' => '<div class="fourteen columns content">', 'after' => '</div>'), 'video' => array('module' => 'video', 'mod_options' => $vid_opts[1]), 'optin' => array('module' => 'signup_form', 'mod_options' => array('ignore_fields' => array('title'))), 'arrow_text' => $content['arrow_text']), 'E' => array('content' => array('module' => 'live_editor', 'module_type' => 'page', 'mod_options' => array('one_col' => true, 'default_layout' => $big_content), 'before' => '<div class="fourteen columns content">', 'after' => '</div>'), 'video' => array('module' => 'video', 'mod_options' => $vid_opts[1]), 'optin' => array('module' => 'signup_form', 'mod_options' => array('ignore_fields' => array('title'))), 'arrow_text' => $content['arrow_text']), 'F' => array('title' => array('module' => 'content_fields', 'mod_options' => $content['title2']), 'video' => array('module' => 'video', 'mod_options' => $vid_opts[0]), 'optin' => array('module' => 'signup_form')), 'G' => array('title' => array('module' => 'content_fields', 'mod_options' => $content['title'], 'before' => '<div class="twentyfour columns">', 'after' => '</div>'), 'image' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('image' => array('type' => 'image', 'name' => __('Image File', OP_SN), 'default' => $this->global_imgs . 'feature-img.jpg', 'disable_font' => true))), 'after_element' => '<img src="' . $this->global_imgs . 'feature-img-arrows.jpg" alt="feature-img" width="204" height="414" />', 'before' => '<div class="thirteen columns">', 'after' => '</div>'), 'optin' => array('module' => 'signup_form')), 'H' => array('title' => array('module' => 'content_fields', 'mod_options' => $content['title2'], 'before' => '<div class="fourteen columns">', 'after' => '</div>'), 'image1' => array('module' => 'content_fields', 'mod_options' => $content['image'], 'before' => '<div class="eight columns offset-by-two">', 'after' => '</div>'), 'optin' => array('module' => 'signup_form', 'mod_options' => array('theme' => '1', 'disable_name' => true, 'ignore_fields' => array('title', 'subtitle', 'footer_note', 'name_default'), 'content_fields' => $optin_fields), 'before' => '<div class="twentyfour columns">', 'after' => '</div>'), 'content' => array('module' => 'live_editor', 'module_type' => 'page', 'mod_options' => array('one_col' => true, 'default_layout' => 'YToxOntpOjA7YToyOntzOjk6InJvd19jbGFzcyI7czozODoicm93IG9uZS1jb2wgZml4ZWQtd2lkdGggY2YgdWktc29ydGFibGUiO3M6NzoiY29sdW1ucyI7YToxOntpOjA7YToyOntzOjk6ImNvbF9jbGFzcyI7czo4OiJvbmUgY29scyI7czo4OiJlbGVtZW50cyI7YToyOntpOjA7czoyMTg6IltoZWFkbGluZSBzdHlsZT1cIjFcIiBmb250X3NpemU9XCI0MFwiIGZvbnRfZm9udD1cIkFyaWFsXCIgZm9udF9zdHlsZT1cImJvbGRcIiBmb250X2NvbG9yPVwiI0NCMkQwN1wiIGFsaWduPVwiY2VudGVyXCJdR2V0IEZyZWUsIEluc3RhbnQgQWNjZXNzIHRvIHRoZSBUb3AgRm91ciBDbGllbnQtR2V0dGluZyBTeXN0ZW1zIGZvciBQZXJzb25hbCBUcmFpbmVyc+KAplsvaGVhZGxpbmVdIjtpOjE7czo0NTU6Ilt0ZXh0X2Jsb2NrIHN0eWxlPVwic3R5bGVfMS5wbmdcIiBhbGlnbj1cImxlZnRcIiB3aWR0aD1cIjU0MFwiXTxzdHJvbmc+R2V0IHRoZSAjIDEgRkFTVEVTVCB3YXkgdG8gZ2V0dGluZyBhbGwgdGhlIGZpdG5lc3MgY2xpZW50cyB5b3UgY2FuIGhhbmRsZSB3aXRob3V0IHNwZW5kaW5nIGEgZGltZSBvbiBhZHZlcnRpc2luZy48L3N0cm9uZz4NCg0KSGkgSSdtIEJlZHJvcyBLZXVpbGlhbiwgdGhhdCdzIG1lIGluIHRoZSBwaWN0dXJlLCBhbmQgdGhlIHZpZGVvIHlvdSdyZSBhYm91dCB0byB3YXRjaCBpcyBmcm9tIG15ICQxLDAwMCBwZXIgcGVyc29uIGZpdG5lc3MgYnVzaW5lc3MuDQoNClBsdXMsIEknbGwgZW1haWwgeW91IG15IHdlZWtseSBQVCBQcm9maXRzIE5ld3NsZXR0ZXIgcGFja2VkIHdpdGggY3V0dGluZyBlZGdlIGlkZWFzLCB0YWN0aWNzLCBhbmQgc3RyYXRlZ2llcy5bL3RleHRfYmxvY2tdIjt9fX19fQ=='), 'before' => '<div class="fourteen columns content">', 'after' => '</div>'), 'image2' => array('module' => 'content_fields', 'mod_options' => $content['image']), 'optin2' => array('module' => 'signup_form', 'mod_options' => array('theme' => '2', 'disable_name' => true, 'ignore_fields' => array('title', 'subtitle', 'name_default'), 'content_fields' => $optin_fields))), 'I' => array('title' => array('module' => 'content_fields', 'mod_options' => $content['title2'], 'before' => '<div class="twentyfour columns">', 'after' => '</div>'), 'content' => array('module' => 'content_fields', 'mod_options' => array('fields' => array_merge($content['subtitle']['fields'], $content['content']['fields'])), 'before' => '<div class="fourteen columns content-area">', 'after' => '</div>'), 'video' => array('module' => 'video', 'mod_options' => array('values' => array('type' => 'video', 'width' => '340', 'height' => '200'))), 'optin' => array('module' => 'signup_form', 'mod_options' => array('theme' => '1', 'disable_name' => true, 'ignore_fields' => array('name_default'), 'content_fields' => $optin_fields), 'before' => '<div class="nine columns">', 'after' => '</div>'), 'optin2' => array('module' => 'signup_form', 'mod_options' => array('theme' => '2', 'disable_name' => true, 'ignore_fields' => array('title', 'subtitle', 'name_default'), 'content_fields' => $optin_fields), 'before' => '<div class="twentyfour columns the-long-form">', 'after' => '</div>')), 'J' => array('content_large' => array('module' => 'live_editor', 'module_type' => 'page')));
     //1,6,2,7,3,8,4,9,5,10
     $style = isset($styles[$style]) ? $style : 'A';
     $this->style = $style;
     $this->options = $styles[$style];
     if ($style != 'J') {
         $this->options = array_merge(array('liveeditor_above' => array('module' => 'live_editor', 'module_type' => 'page')), $this->options, array('liveeditor_below' => array('module' => 'live_editor', 'module_type' => 'page')));
     }
     foreach ($this->options as $name => $options) {
         op_mod($options['module'], op_get_var($options, 'module_type', 'blog'));
         if (!isset($options['template'])) {
             if ($this->options[$name]['module'] == 'content_fields') {
                 $this->options[$name]['template'] = array($this, 'content_fields');
             } elseif ($this->options[$name]['module'] == 'signup_form') {
                 $this->options[$name]['template'] = array($this, 'optin_box');
                 $mod_options = op_get_var($options, 'mod_options', array());
                 $mod_options['disable'] = 'color_scheme';
                 if (!isset($mod_options['content_fields'])) {
                     $mod_options['content_fields'] = op_optin_default_fields();
                 }
                 $mod_options['submit_button_config'] = array('defaults' => array('content' => __('Get Started', OP_SN)));
                 $this->options[$name]['mod_options'] = $mod_options;
             } elseif ($this->options[$name]['module'] == 'video') {
                 $this->options[$name]['template'] = array($this, 'video_placeholder');
             }
         }
     }
     $this->options['template'] = array($this, 'style_template');
 }
开发者ID:denis-chmel,项目名称:wordpress,代码行数:41,代码来源:feature_area.php

示例14: save_step

 function save_step()
 {
     //Get the primary OP object
     $op = $_POST['op'];
     //Get sections
     $sections_op = op_get_var($op, 'sections', array());
     //Loop through sections
     foreach ($this->sections as $name => $section) {
         //Get current sections
         $sections = $section['object']->sections();
         //Loop through sub sections
         foreach ($sections as $section_name => $section_section) {
             if (is_array($section_section)) {
                 if (isset($section_section['save_action'])) {
                     call_user_func_array($section_section['save_action'], array($sections_op));
                 }
                 if (isset($section_section['module'])) {
                     $mod_ops = op_get_var($op, $section_name, array());
                     $opts = op_get_var($section_section, 'options', array());
                     op_mod($section_section['module'])->save_settings($section_name, $opts, $mod_ops);
                 }
             }
         }
     }
     if (op_has_error()) {
         $this->error = __('There was a problem processing the form, please review the errors below', 'optimizepress');
     } else {
         $this->notification = __('Your settings have been updated.', 'optimizepress');
     }
 }
开发者ID:kyscastellanos,项目名称:arepa,代码行数:30,代码来源:dashboard.php

示例15: wp_nav_menu

        </style>
        <?php 
    }
    ?>
    <nav id="nav-bottom" class="navigation">
        <div class="content-width cf">
            <ul id="navigation-below"><?php 
    wp_nav_menu(array('theme_location' => 'primary', 'items_wrap' => '%3$s', 'container' => false, 'walker' => new Op_Arrow_Walker_Nav_Menu()));
    ?>
</ul>
        </div>
    </nav>
    <?php 
}
if (is_home()) {
    op_mod('feature_area')->display('home_feature');
}
$class = op_default_attr('column_layout', 'option');
$add_sidebar = true;
if (defined('OP_SIDEBAR')) {
    if (OP_SIDEBAR === false) {
        $class = 'no-sidebar';
        $add_sidebar = false;
    } else {
        $class = OP_SIDEBAR;
    }
}
?>


    <!-- <div class="main-content content-width cf <?php 
开发者ID:JalpMi,项目名称:v2contact,代码行数:31,代码来源:header.php


注:本文中的op_mod函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。