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


PHP op_attr函数代码示例

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


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

示例1: display_settings

 function display_settings($section_name, $config = array(), $return = false)
 {
     global $wpdb;
     $data = array('fieldid' => $this->get_fieldid($section_name), 'fieldname' => $this->get_fieldname($section_name), 'section_name' => $section_name);
     $funnel_dropdown = '';
     $current = intval(op_page_option($section_name, 'funnel_id'));
     $found = false;
     $funnels = $wpdb->get_results("SELECT id,title FROM `{$wpdb->prefix}optimizepress_launchfunnels` ORDER BY title ASC");
     $funnel_count = 0;
     if ($funnels) {
         $funnel_count = count($funnels);
         foreach ($funnels as $funnel) {
             if ($current < 1) {
                 $current = $funnel->id;
                 $found = true;
             } elseif ($current == $funnel->id) {
                 $found = true;
             }
             $funnel_dropdown .= '<option value="' . $funnel->id . '"' . ($current == $funnel->id ? ' selected="selected"' : '') . '>' . op_attr($funnel->title) . '</option>';
         }
     }
     $data['funnel_count'] = $funnel_count;
     $data['funnel_select'] = '<select name="' . $data['fieldname'] . '[funnel_id]" id="' . $data['fieldid'] . 'funnel_id">' . $funnel_dropdown . '</select>';
     $this->add_js = true;
     $out = $this->load_tpl('settings', $data);
     if ($return) {
         return $out;
     }
     echo $out;
 }
开发者ID:shahadat014,项目名称:geleyi,代码行数:30,代码来源:launch_funnel.php

示例2: liveeditor_elements

 function liveeditor_elements($atts, $content = '')
 {
     $newcontent = $content;
     if (defined('OP_AJAX_SHORTCODE') && isset($GLOBALS['OP_LIVEEDITOR_DEPTH']) && $GLOBALS['OP_LIVEEDITOR_DEPTH'] === 1 && $GLOBALS['OP_ADD_ELEMENT_ROWS'] === true) {
         $mc = preg_match_all('/' . op_shortcode_regex('op_liveeditor_element') . '/s', $content, $matches);
         $new_content = '';
         if ($mc > 0) {
             for ($i = 0; $i < $mc; $i++) {
                 $sc = op_clean_shortcode_content($matches[5][$i]);
                 $new_content .= '<div class="row element-container cf"><div class="op-element-links"><a class="element-settings" href="#settings"><img alt="' . __('Edit Element', OP_SN) . '" title="' . __('Edit Element', OP_SN) . '" src="' . OP_IMG . 'pencil.png" /></a><a class="element-advanced" href="#op-le-advanced"><img alt="' . __('Advanced Element Options', OP_SN) . '" title="' . __('Advanced Element Options', OP_SN) . '" src="' . OP_IMG . 'pencil.png" /></a><a class="element-move" href="#move"><img alt="' . __('Move', OP_SN) . '" src="' . OP_IMG . 'move-icon.png" /></a><a class="element-delete" href="#delete"><img alt="' . __('Remove Element', OP_SN) . '" src="' . OP_IMG . 'remove-row.png" /></a></div><div class="op-hidden op-waiting"><img class="op-bsw-waiting op-show-waiting" alt="" src="images/wpspin_light.gif" /></div><div class="element">' . do_shortcode(shortcode_unautop(wpautop($sc))) . '</div><div class="op-hidden"><textarea class="op-le-child-shortcode" name="shortcode[]">' . op_attr(trim(shortcode_unautop($sc))) . '</textarea></div></div>';
             }
         }
         return $new_content;
     }
     $newcontent = do_shortcode(op_clean_shortcode_content($content)) . (defined('OP_LIVEEDITOR') ? '<a href="#add_element" class="add-new-element"><img src="' . OP_IMG . '/live_editor/add_new.png" alt="' . __('Add Element', OP_SN) . '"><span>' . __('Add Element', OP_SN) . '</span></a>' : '');
     return $newcontent;
 }
开发者ID:shahadat014,项目名称:geleyi,代码行数:17,代码来源:live_editor.php

示例3: str_replace

echo $field_ext;
?>
" id="op_funnel_pages_<?php 
echo str_replace(array('[', ']'), '', $field_name);
?>
_navigation_active_link_text_<?php 
echo str_replace(array('[', ']'), '', $field_ext);
?>
" value="<?php 
echo op_attr(op_get_var($conf, 'active_link_text'));
?>
" />

<label class="form-title"><?php 
_e('Coming Soon Navigation Link Text', OP_SN);
?>
</label>
<p class="op-micro-copy"><?php 
_e('Enter the text for the link which appear in your launch navigation when this page is inactive (coming soon)', OP_SN);
?>
</p>
<input type="text" name="op[funnel_pages]<?php 
echo $field_name;
?>
[navigation][inactive_link_text]<?php 
echo $field_ext;
?>
" value="<?php 
echo op_attr(op_get_var($conf, 'inactive_link_text'));
?>
" />
开发者ID:shahadat014,项目名称:geleyi,代码行数:31,代码来源:navigation_text.php

示例4: op_default_attr_e

function op_default_attr_e()
{
    $args = func_get_args();
    echo op_attr(call_user_func_array('op_default_option', $args));
}
开发者ID:shahadat014,项目名称:geleyi,代码行数:5,代码来源:options.php

示例5: getOptinUrlValue

 /**
  * Checks GET vars for 'op_' prefixed parameters to fill the value or call 'op_optin_field_value' filter
  * @author Luka Peharda <luka.peharda@gmail.com>
  * @param  string $name
  * @return string
  */
 function getOptinUrlValue($name)
 {
     $value = op_get('op_' . strtolower($name));
     if (false !== $value) {
         $value = op_attr($value);
     } else {
         if ('FNAME' == $name) {
             $value = getOptinUrlValue('name');
         } else {
             $value = apply_filters('op_optin_field_value', $value, $name);
         }
     }
     return $value;
 }
开发者ID:denis-chmel,项目名称:wordpress,代码行数:20,代码来源:framework.php

示例6: op_attr

    <li><div class="fb-like" data-href="<?php 
echo $fb_like_url;
?>
" data-send="false" data-layout="box_count" data-width="450" data-show-faces="true"></div></li>
    <li><div class="g-plusone" data-size="tall" data-href="<?php 
echo $g_url;
?>
"></div></li>
    <li><a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php 
echo $tw_url;
?>
" <?php 
echo $tw_name != '' ? ' data-via="' . op_attr($tw_name) . '"' : '';
?>
 <?php 
echo ucfirst($tw_text) != '' ? ' data-text="' . op_attr($tw_text) . '"' : '';
?>
 data-lang="<?php 
echo $tw_lang;
?>
" data-related="anywhereTheJavascriptAPI" data-count="vertical"><?php 
__('Tweet', OP_SN);
?>
</a></li>
    <li><?php 
include 'linkedin-button.inc.php';
?>
</li>
    <li class="op-pin-it-btn"><a href="http://pinterest.com/pin/create/button/?url=<?php 
echo urlencode($p_url);
?>
开发者ID:JalpMi,项目名称:v2contact,代码行数:31,代码来源:style-6.php

示例7: op_thumb_gallery

function op_thumb_gallery($fieldid, $value = '', $gallery_dir = '', $id = '', $return = false)
{
    static $gallery_count = 0;
    $id = empty($id) ? str_replace(array('[]', '][', '[', ']'), array('_' . $gallery_count, '_', '_', ''), $fieldid) : str_replace(array('[]', '][', '[', ']'), array('_' . $gallery_count, '_', '_', ''), $id);
    $html = '
    <div id="' . $id . '" class="op-thumb-gallery">
        <a data-target="' . $id . '_gallery" href="#" class="button op-content-slider-button" title="' . esc_attr__('Select From Gallery') . '" style="background-image:url(images/white-grad.png)">' . __('Select From Gallery', OP_SN) . '</a>
    ';
    $html .= '
        <input type="hidden" name="' . $fieldid . '" id="' . $id . '" value="' . op_attr($value) . '" class="op-gallery-value" />
        <span class="file-preview cf">
            <div class="op-waiting"><img class="op-bsw-waiting op-show-waiting op-hidden" alt="" src="images/wpspin_light.gif" /></div>
            <div class="content cf">
    ';
    if ($value != '' && $value !== false) {
        $ext = preg_match('/\\.([^.]+)$/', $value, $matches) ? strtolower($matches[1]) : false;
        if (in_array($ext, array('jpg', 'jpeg', 'gif', 'png'))) {
            $html .= '<a href="' . $value . '" target="_blank" class="preview-image"><img src="' . $value . '" alt="uploaded-image" /></a><a href="#remove" class="remove-file button">' . __('Remove Image', OP_SN) . '</a>';
        } else {
            $html .= '<a href="' . $value . '" target="_blank" class="preview-image">' . __('View File', OP_SN) . '</a><a href="#remove" class="remove-file button">' . __('Remove File', OP_SN) . '</a>';
        }
    }
    $html .= '
            </div>
        </span>
    </div>
    ';
    $gallery = op_list_directory_images(OP_THUMB . $gallery_dir);
    $html .= op_image_slider($id . '_gallery', $gallery, true);
    //$html .= '<script type="text/javascript">bind_content_sliders();</script>';
    $gallery_count++;
    if ($return) {
        return $html;
    } else {
        echo $html;
    }
}
开发者ID:JalpMi,项目名称:v2contact,代码行数:37,代码来源:admin.php

示例8: social_sharing

    static function social_sharing($atts)
    {
        global $post;
        $page_id = defined('OP_PAGEBUILDER_ID') ? OP_PAGEBUILDER_ID : $post->ID;
        $url = get_permalink($page_id);
        // Decode encoded chars
        $atts = op_urldecode($atts);
        $data = shortcode_atts(array('style' => 'horizontal', 'fb_like_url' => $url, 'fb_color' => 'light', 'fb_lang' => op_default_attr('comments', 'facebook', 'language'), 'fb_text' => 'Like', 'fb_button_text' => 'Share', 'tw_text' => 'Share', 'tw_lang' => 'en', 'tw_url' => $url, 'tw_button_text' => 'Share', 'tw_name' => '', 'g_url' => $url, 'g_lang' => 'en-GB', 'g_button_text' => 'Share', 'p_url' => $url, 'p_image_url' => $url, 'p_description' => '', 'su_url' => $url, 'linkedin_url' => $url, 'linkedin_lang' => 'en_US', 'alignment' => 'center'), $atts);
        extract($data);
        $attrs = $style == 'horizontal' ? array('fb_button_style' => 'button_count', 'fb_extra' => ' data-width="89"', 'tw_extra' => ' style="width:98px"', 'g_size' => 'medium', 'g_extra' => ' style="width:85px"', 'su_style' => '1', 'p_extra' => ' data-pin-config="beside"') : array('fb_extra' => '', 'fb_button_style' => 'box_count', 'tw_extra' => ' data-count="vertical"', 'g_size' => 'tall', 'su_style' => '5', 'g_extra' => '', 'p_extra' => ' data-pin-config="above"');
        $data['id'] = 'social-sharing-' . op_generate_id();
        //Init Facebook html
        $fbAppId = op_default_attr('comments', 'facebook', 'id') ? 'appId: ' . op_default_attr('comments', 'facebook', 'id') . ',' : '';
        $data['fb_html'] = '
            <script>
            window.fbAsyncInit = function() {
                FB.init({
                    ' . $fbAppId . '
                    xfbml      : true,
                    version    : \'v2.0\'
                });
                opjq(window).trigger("OP.fbAsyncInit");
            };
            (function(d, s, id){
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id)) {return;}
                js = d.createElement(s); js.id = id;
                js.src = "//connect.facebook.net/' . $fb_lang . '/sdk.js";
                fjs.parentNode.insertBefore(js, fjs);
            }(document, \'script\', \'facebook-jssdk\'));

            if (typeof FB !== "undefined") { FB.XFBML.parse(); }
            </script>
            <div class="fb-like" data-send="false"' . ($fb_like_url != '' ? ' data-href="' . $fb_like_url . '"' : '') . ' data-layout="' . $attrs['fb_button_style'] . '" data-show-faces="false" data-action="' . $fb_text . '" data-colorscheme="' . $fb_color . '"' . $attrs['fb_extra'] . '></div>
        ';
        //Init Twitter html
        $data['twitter_html'] = '
            <a href="https://twitter.com/share" class="twitter-share-button"' . (ucfirst($tw_text) != '' ? ' data-text="' . op_attr($tw_text) . '"' : '') . ($tw_url != '' ? ' data-url="' . op_attr($tw_url) . '"' : '') . ($tw_name != '' ? ' data-via="' . op_attr($tw_name) . '"' : '') . ' data-lang="' . $tw_lang . '"' . $attrs['tw_extra'] . '>' . __('Tweet', OP_SN) . '</a>
            <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
            <script>
            if (typeof twttr === "object"
                && typeof twttr.widgets === "object"
                && typeof twttr.widgets.load === "function") {
                try {
                    twttr.widgets.load();
                } catch(e) {}
            }
            </script>
        ';
        //Init Google+ html
        $data['gplus_html'] = '
            <div class="g-plusone" data-size="' . $attrs['g_size'] . '" data-href="' . $g_url . '"' . $attrs['g_extra'] . '></div>
            <script type="text/javascript">
              window.___gcfg = {lang: \'' . $g_lang . '\'};
              (function() {
                var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
                po.src = \'https://apis.google.com/js/plusone.js\';
                var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
              })();
            </script>
        ';
        //Init Pinterest html
        // $data['pinterest_html'] = '
        //     <span class="pinbreak"><a href="http://pinterest.com/pin/create/button/?url='.$p_url.'&media='.$p_image_url.($p_description!=''?'&description='.$p_description:'').'" class="pin-it-button" data-pin-do="buttonPin" count-layout="'.$style.'"'.$attrs['p_extra'].'><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="'.__('Pin It',OP_SN).'" /></a></span>
        //     <script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>
        // ';
        $data['pinterest_html'] = '
            <span class="pinbreak"><a href="http://pinterest.com/pin/create/button/?url=' . $p_url . '&media=' . $p_image_url . ($p_description != '' ? '&description=' . $p_description : '') . '" class="pin-it-button" data-pin-do="buttonPin" ' . $attrs['p_extra'] . '><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="' . __('Pin It', OP_SN) . '" /></a></span>
            <script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>
            <script>
            if (typeof window.parsePinBtns === "function") {
                window.parsePinBtns();
            }
            </script>
        ';
        //Init StumbleUpon html
        $data['su_html'] = '
            <div class="op-stumbleupon-badge">
            <su:badge layout="' . $attrs['su_style'] . '" location="' . $su_url . '"></su:badge>

            <script type="text/javascript">
              (function() {
                var li = document.createElement(\'script\'); li.type = \'text/javascript\'; li.async = true;
                li.src = (\'https:\' == document.location.protocol ? \'https:\' : \'http:\') + \'//platform.stumbleupon.com/1/widgets.js\';
                var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(li, s);
              })();
            </script>
            </div>
        ';
        //Init LinkedIn html
        $data['linkedin_html'] = '
            <script src="//platform.linkedin.com/in.js" type="text/javascript">
            lang: ' . $linkedin_lang . '
                </script>
                <script type="IN/Share" data-url="' . $linkedin_url . '" data-counter="top"></script>
                <script>
                if (typeof IN === "object" && typeof IN.parse === "function") {
                    IN.parse();
                }
                </script>
//.........这里部分代码省略.........
开发者ID:JalpMi,项目名称:v2contact,代码行数:101,代码来源:default.php

示例9: __

                case 'addon':
                    $header = __('Add-on Elements', OP_SN);
                    break;
                case 'theme':
                    $header = __('Theme Elements', OP_SN);
                    break;
            }
            echo '
		            <li><h2>' . $header . '</h2></li>';
        }
        uasort($assets, 'op_sort_asset_array');
        foreach ($assets as $tag => $info) {
            $img = '';
            $classname = ' class="asset-list-item no-image"';
            if (isset($info['image']) && !empty($info['image'])) {
                $img = '<img src="' . $info['image'] . '" alt="' . op_attr($info['title']) . '" />';
                $classname = ' class="op-asset-list-item"';
            }
            echo '
                    <li' . $classname . '>
                        <a href="#' . $group . '/' . $tag . '" class="cf asset-' . $group . '-' . $tag . ' group-' . $group . '">' . $img . '<span class="content"><span class="title">' . $info['title'] . '</span>' . (isset($info['description']) && !empty($info['description']) ? '<span class="description">' . $info['description'] . '</span>' : '') . '</span></a>
                    </li>';
            $asset_groups[$group][$tag] = array('settings' => op_get_var($info, 'settings', 'N'), 'base_path' => op_get_var($info, 'base_path', null));
        }
        echo '
                </ul>
            </div>';
    }
}
?>
        	</div>
开发者ID:denis-chmel,项目名称:wordpress,代码行数:31,代码来源:dialog.php

示例10: op_attr

                </div>
            </div>
            <div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar cf" id="op_container_content_<?php 
echo $id;
?>
_text">
                <input type="text" name="<?php 
echo $fieldname;
?>
[content]"<?php 
if ($buttonType != 1) {
    echo ' disabled="disabled"';
}
?>
 id="op_assets_submit_button_text_box_text_properties_1_text" value="<?php 
op_attr(op_get_var($button, 'content', 'Get Started Now'), true);
?>
" />
                <?php 
echo op_font_size_dropdown($fieldname . '[text_size]', op_get_var($button, 'text_size', 32), 'op_assets_submit_button_text_box_text_properties_1_size');
echo op_font_visual_dropdown_with_input('op_assets_submit_button_text_box_text_properties_1_container', $fieldname . '[text_font]', op_get_var($button, 'text_font'));
echo op_color_picker($fieldname . '[text_color]', op_get_var($button, 'text_color', '#000000'), 'op_assets_submit_button_text_box_text_properties_1_color', false, true);
?>
                <div class="style-checkbox-selector cf field-id-op_assets_submit_button_text_box_text_properties_1">
                    <input name="<?php 
echo $fieldname;
?>
[text_bold]" value="1" type="checkbox"<?php 
checked('1', op_get_var($button, 'text_bold', '1'));
?>
 class="op-font-style-checkbox op-font-style-bold" id="op_assets_submit_button_text_box_text_bold_1">
开发者ID:denis-chmel,项目名称:wordpress,代码行数:31,代码来源:index.php

示例11: str_replace

echo $field_ext;
?>
" id="op_funnel_pages_<?php 
echo str_replace(array('[', ']'), '', $field_name);
?>
_navigation_active_link_text_<?php 
echo str_replace(array('[', ']'), '', $field_ext);
?>
" value="<?php 
echo stripslashes(op_attr(op_get_var($conf, 'active_link_text')));
?>
" />

<label class="form-title"><?php 
_e('Coming Soon Navigation Link Text', OP_SN);
?>
</label>
<p class="op-micro-copy"><?php 
_e('Enter the text for the link which appear in your launch navigation when this page is inactive (coming soon)', OP_SN);
?>
</p>
<input type="text" name="op[funnel_pages]<?php 
echo $field_name;
?>
[navigation][inactive_link_text]<?php 
echo $field_ext;
?>
" value="<?php 
echo stripslashes(op_attr(op_get_var($conf, 'inactive_link_text')));
?>
" />
开发者ID:denis-chmel,项目名称:wordpress,代码行数:31,代码来源:navigation_text.php

示例12: output

 function output($section_name, $config, $op, $return = false)
 {
     $disable = $this->_get_disabled($config);
     if (is_array($section_name[0]) && count($section_name) > 1) {
         $tmp = $section_name;
         $section_name = $section_name[0];
         for ($i = 1, $sl = count($tmp); $i < $sl; $i++) {
             array_push($section_name, $tmp[$i]);
         }
     }
     $data = $used_fields = array();
     if (isset($op['form_html'])) {
         $order = array();
         $fh = $op['form_html'];
         $data['before_form'] = op_get_var($config, 'before_form');
         $data['after_form'] = op_get_var($config, 'after_form');
         $data['extra_fields'] = array();
         $form_class = '';
         $disable_name = op_get_var($fh, 'disable_name', 'N') == 'Y';
         $js_defaults = array();
         $fields = array('email');
         $order[op_get_var($fh, 'email_order', 0)][] = 'email_input';
         if (!$disable_name) {
             array_unshift($fields, 'name');
             $order[op_get_var($fh, 'name_order', 0)][] = 'name_input';
         }
         $required = 'required="required"';
         switch (op_get_var($fh, 'integration_type')) {
             case 'email':
                 $email_address = op_get_var($fh, 'email_address');
                 $redirect_url = op_get_var($fh, 'redirect_url');
                 if (!isset($disable['content']) && isset($op['content'])) {
                     foreach ($fields as $field) {
                         if (isset($op['content'][$field . '_default']) && !empty($op['content'][$field . '_default'])) {
                             $js_defaults[$field] = $op['content'][$field . '_default'];
                         }
                     }
                     if (count($js_defaults) > 0) {
                         $count = count($this->output_defaults);
                         $this->output_defaults[++$count] = $js_defaults;
                         $form_class = 'op-signup-form-' . $count;
                     }
                 }
                 $new_fields = array();
                 foreach ($fields as $field) {
                     if ($field == 'email') {
                         $data[$field . '_input'] = '<input type="email" required="required" name="' . $field . '" placeholder="' . op_attr(op_get_var($js_defaults, $field)) . '" class="' . $field . '" />';
                     } else {
                         $requiredField = '';
                         if (!isset($fh['name_required']) || op_get_var($fh, 'name_required') == 'Y') {
                             $requiredField = $required;
                         }
                         $data[$field . '_input'] = '<input type="text" ' . $requiredField . ' name="' . $field . '" placeholder="' . op_attr(op_get_var($js_defaults, $field)) . '" class="' . $field . '" />';
                     }
                     $new_fields[$field] = array('name' => $field, 'text' => op_get_var($js_defaults, $field));
                 }
                 $extra_fields = op_get_var($fh, 'email_extra_fields', array());
                 $extra_fields_order = op_get_var($fh, 'email_extra_fields_order', array());
                 $extra_fields_required = op_get_var($fh, 'email_extra_fields_required', array());
                 $new_extra = array();
                 if (is_array($extra_fields)) {
                     $counter = 1;
                     foreach ($extra_fields as $field) {
                         $new_extra['op_extra_' . $counter] = $field;
                         $requiredField = '';
                         if (isset($extra_fields_required[$counter - 1]) && $extra_fields_required[$counter - 1] == 'Y') {
                             $requiredField = $required;
                         }
                         $data['extra_fields']['op_extra_' . $counter] = '<input type="text" ' . $requiredField . ' name="op_extra_' . $counter . '" placeholder="' . op_attr($field) . '" />';
                         $field_order = $order[op_get_var($extra_fields_order, $counter - 1, 0)][] = 'op_extra_' . $counter;
                         $counter++;
                     }
                 }
                 $data['form_open'] = '<form action="' . op_current_url() . '" method="post" class="op-optin-validation ' . $form_class . '">';
                 $data['form_close'] = '</form>';
                 $hidden = array('email_to' => $email_address, 'redirect_url' => $redirect_url, 'extra_fields' => $new_extra, 'fields' => $new_fields);
                 $data['hidden_elems'] = '<input type="hidden" name="op_optin_form_data" value="' . op_attr(base64_encode(serialize($hidden))) . '" /><input type="hidden" name="op_optin_form" value="Y" />';
                 break;
             case 'custom':
             case 'oneshoppingcart':
                 if ('Y' === op_get_var($fh, 'gotowebinar_enabled', 'N')) {
                     $action = get_bloginfo('url') . '/process-optin-form/';
                 } else {
                     $action = op_get_var($fh, 'action');
                 }
                 if ($action != '') {
                     if (!isset($disable['content']) && isset($op['content'])) {
                         foreach ($fields as $field) {
                             if (isset($op['content'][$field . '_default']) && !empty($op['content'][$field . '_default'])) {
                                 $js_defaults[$field] = $op['content'][$field . '_default'];
                             }
                         }
                         if (count($js_defaults) > 0) {
                             $count = count($this->output_defaults);
                             $this->output_defaults[++$count] = $js_defaults;
                             $form_class = 'op-signup-form-' . $count;
                         }
                     }
                     $data['form_open'] = '<form action="' . $action . '" method="' . op_get_var($fh, 'method', 'post') . '" class="op-optin-validation ' . $form_class . '">';
                     $data['form_close'] = '</form>';
//.........这里部分代码省略.........
开发者ID:kyscastellanos,项目名称:arepa,代码行数:101,代码来源:signup_form.php

示例13: generate_layout


//.........这里部分代码省略.........
                                         $result_row = $result_row . '[/op_liveeditor_element]';
                                         $child_html .= $child_rows_result[1][$child_element_nr] . op_process_content_filter($result_row) . '</div>';
                                         $child_element_nr += 1;
                                     }
                                     if ($op_popup_present) {
                                         $new_popup_elements = '';
                                         $new_popup_elements_sc = '';
                                         preg_match_all('/\\[op_popup_content_element[ d|\\]].*?\\[\\/op_popup_content_element\\]/is', $sc, $popup_elements);
                                         foreach ($popup_elements[0] as $popup_element) {
                                             $new_popup_elements_sc .= $popup_element;
                                             $popup_element = str_replace('[op_popup_content_element]', '[op_liveeditor_element]', $popup_element);
                                             $popup_element = str_replace('[/op_popup_content_element]', '[/op_liveeditor_element]', $popup_element);
                                             $popup_element = op_process_content_filter($popup_element, true);
                                             $new_popup_elements .= $popup_element;
                                         }
                                         //$new_popup_elements = '[op_liveeditor_elements]' . $new_popup_elements . '[/op_liveeditor_elements]';
                                         $new_popup_elements = '<div class="op-popup-content">' . $new_popup_elements . '</div>';
                                         $new_popup_elements .= op_process_content_filter('[op_liveeditor_elements][/op_liveeditor_elements]', true);
                                         $new_popup_elements = str_replace('$', '\\$', $new_popup_elements);
                                         $processed = preg_replace('/\\[op_popup_content[ d|\\]].*?\\[\\/op_popup_content\\]/is', $new_popup_elements, $sc);
                                         // Parse op_popup_button
                                         // preg_match_all('/\[op_popup_button\].*?\[\/op_popup_button\]/is', $sc, $new_popup_button);
                                         preg_match_all('/\\[op_popup_button\\].*?\\[\\/op_popup_button\\]/is', str_replace('$', '\\$', $sc), $new_popup_button);
                                         $new_popup_button = $new_popup_button[0][0];
                                         $new_popup_button = str_replace('[op_popup_button]', '', $new_popup_button);
                                         $new_popup_button = str_replace('[/op_popup_button]', '', $new_popup_button);
                                         $new_popup_button = op_process_content_filter($new_popup_button, true);
                                         $new_popup_button = '<div class="op-popup-button ' . $popup_button_class . '">' . $new_popup_button . '</div>';
                                         $processed = op_process_content_filter($processed, true);
                                         $new_popup_button = str_replace('$', '\\$', $new_popup_button);
                                         $processed = preg_replace('/\\[op_popup_button\\].*?\\[\\/op_popup_button\\]/is', $new_popup_button, $processed);
                                         // $processed = str_replace('[op_popup_button]', '<div class="op-popup-button ' . $popup_button_class . '">', $processed);
                                         // $processed = str_replace('[/op_popup_button]', '</div>', $processed);
                                         $processed .= $le ? '<div class="op-hidden"><textarea class="op-le-child-shortcode" name="shortcode[]">' . op_attr(shortcode_unautop('[op_popup_elements]' . $new_popup_elements_sc . '[/op_popup_elements]')) . '</textarea></div>' : '';
                                     }
                                     if (!$op_popup_present) {
                                         /**
                                          * At the end of child elements "add element" button must
                                          * be inserted, which is done by parsing [op_liveeditor_elements] shortcode
                                          */
                                         $child_html .= op_process_content_filter('[op_liveeditor_elements][/op_liveeditor_elements]', true);
                                         $child_html = op_process_asset_content($child_html) . ($le ? '<div class="op-hidden"><textarea class="op-le-child-shortcode" name="shortcode[]">' . op_attr(shortcode_unautop($matches[0])) . '</textarea></div>' : '');
                                         /*
                                          * $ needs to be escaped
                                          */
                                         $child_html = str_replace('$', '\\$', $child_html);
                                         $processed = preg_replace(array('{<p[^>]*>\\s*#OP_CHILD_ELEMENTS#\\s*<\\/p>}i', '{#OP_CHILD_ELEMENTS#}i'), $child_html, $processed);
                                     }
                                     if (defined('OP_LIVEEDITOR')) {
                                         $new_element_start = substr($element_start, 0, 30) . '<a class="element-parent-settings" href="#parent-settings"><img alt="' . __('Edit Parent Element', OP_SN) . '" title="' . __('Edit Parent Element', OP_SN) . '" src="' . OP_IMG . 'pencil.png" /></a>' . substr($element_start, 30);
                                     }
                                 } else {
                                     $processed = op_process_content_filter($sc, true);
                                 }
                                 if (strpos($sc, '[op_popup ') !== false && defined('OP_LIVEEDITOR')) {
                                     $new_element_start = substr($element_start, 0, 30) . '<a class="element-parent-settings" href="#parent-settings"><img alt="' . __('Edit Parent Element', OP_SN) . '" title="' . __('Edit Parent Element', OP_SN) . '" src="' . OP_IMG . 'pencil.png" /></a>' . substr($element_start, 30);
                                 }
                                 $html .= '<div class="' . $elClass . '"' . $data_fade . 'data-style="' . $elementDataStyle . '" id="' . $pref . $rcounter . '_col_' . $ccounter . '_el_' . $elNumber . '">' . $new_element_start;
                                 //$html .= $elemBefore .'<div class="element">' . $processed . '</div>' . $elemAfter;
                                 if (!is_admin()) {
                                     $content = do_shortcode($elemBefore . '###OP_ELEM_PROCESSED###' . $elemAfter);
                                     $content = str_replace('###OP_ELEM_PROCESSED###', $processed, $content);
                                 } else {
                                     $content = $elemBefore . $processed . $elemAfter;
                                 }
                                 // if (!is_admin() && !$op_popup_present) {
开发者ID:denis-chmel,项目名称:wordpress,代码行数:67,代码来源:page_options.php

示例14: getOptinUrlValue

 /**
  * Checks GET vars for 'op_' prefixed parameters to fill the value
  * @author Luka Peharda <luka.peharda@gmail.com>
  * @param  string $name
  * @return string
  */
 function getOptinUrlValue($name)
 {
     $value = op_get('op_' . strtolower($name));
     if (false !== $value) {
         $value = op_attr($value);
     } else {
         if ('FNAME' == $name) {
             $value = getOptinUrlValue('name');
         }
     }
     return $value;
 }
开发者ID:shahadat014,项目名称:geleyi,代码行数:18,代码来源:framework.php

示例15: op_attr

        ?>
[form_html][email_extra_fields_order][]" value="<?php 
        echo op_attr($fields['email_extra_fields_order'][$i]);
        ?>
" />
                </div>
                <div class="form_html_field_required">
                    <label><?php 
        _e('Required', OP_SN);
        ?>
</label>
                    <input type="checkbox" name="<?php 
        echo $fieldname;
        ?>
[form_html][email_extra_fields_required][]" value="Y" <?php 
        checked(op_attr($fields['email_extra_fields_required'][$i]), 'Y');
        ?>
 />
                </div>
                <div class="op-multirow-controls">
                    <a href="#remove"><img alt="<?php 
        _e('Remove', OP_SN);
        ?>
" src="<?php 
        echo OP_IMG;
        ?>
remove-row.png" /></a>
                </div>
            </div>
		<?php 
        $i += 1;
开发者ID:denis-chmel,项目名称:wordpress,代码行数:31,代码来源:form_html.php


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