• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP ent2ncr函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: podPress_feedSafeContent

function podPress_feedSafeContent($input, $aggressive = FALSE, $removescripts = FALSE)
{
    global $podPress;
    // All values should be plain text (no markup or HTML). [...] CDATA sections are strongly discouraged. (see http://www.apple.com/itunes/podcasts/specs.html#encoding)
    if (TRUE === $removescripts) {
        // this option is only reachable via php source code and via the WP backend
        $input = preg_replace('/<script[\\w\\W]*<\\/script>/i', '', $input);
    }
    $input = strip_tags($input);
    // replace the relevant characters with their HTML entities
    if (TRUE === $aggressive) {
        if (TRUE === version_compare(PHP_VERSION, '5.2.3', '>=')) {
            $result = htmlentities($input, ENT_NOQUOTES, get_bloginfo('charset'), FALSE);
        } else {
            $result = htmlentities($input, ENT_NOQUOTES, get_bloginfo('charset'));
        }
    } else {
        if (TRUE === version_compare(PHP_VERSION, '5.2.3', '>=')) {
            $result = htmlspecialchars($input, ENT_NOQUOTES, get_bloginfo('charset'), FALSE);
        } else {
            $result = htmlspecialchars($input, ENT_NOQUOTES, get_bloginfo('charset'));
        }
    }
    $input = $result;
    $result = str_replace('&nbsp;', ' ', $input);
    // transform all HTML entities in to their numeric equivalents
    $result = ent2ncr($result);
    return $result;
}
开发者ID:niko-lgdcom,项目名称:archives,代码行数:29,代码来源:podpress_feed_functions.php


示例2: livePreview

    public function livePreview()
    {
        ?>
		<script>
			jQuery(document).ready(function ($) {
				<?php 
        foreach ($this->options as $option) {
            if (empty($option->settings['livepreview'])) {
                continue;
            }
            ?>
				wp.customize('<?php 
            echo esc_attr($option->getID());
            ?>
', function (v) {
					v.bind(function (value) {
						<?php 
            // Some options may want to insert custom jQuery code before manipulation of live preview
            if (!empty($option->settings['id'])) {
                do_action('tf_livepreview_pre_' . $this->owner->optionNamespace, $option->settings['id'], $option->settings['type'], $option);
            }
            echo ent2ncr($option->settings['livepreview']);
            ?>
					});
				});
				<?php 
        }
        ?>
			});
		</script>
	<?php 
    }
开发者ID:vinhnq1211,项目名称:funy,代码行数:32,代码来源:thim-class-customizer-section.php


示例3: display

    public function display()
    {
        wp_enqueue_script('wp-color-picker');
        wp_enqueue_style('wp-color-picker');
        $this->echoOptionHeader();
        ?>
        <input class="thim-color-control color-picker-hex wp-color-picker" type="text" name="<?php 
        echo esc_attr($this->getID());
        ?>
" id="<?php 
        echo esc_attr($this->getID());
        ?>
" value="<?php 
        echo ent2ncr($this->getValue());
        ?>
"  data-default-color="<?php 
        echo ent2ncr($this->getValue());
        ?>
"/>
        <?php 
        // load the javascript to init the colorpicker
        if (self::$firstLoad) {
            ?>
            <script>
                jQuery(document).ready(function ($) {
                    "use strict";
                    $('.tf-colorpicker').wpColorPicker();
                });
            </script>
            <?php 
        }
        $this->echoOptionFooter();
        self::$firstLoad = false;
    }
开发者ID:vinhnq1211,项目名称:funy,代码行数:34,代码来源:class-option-color-opacity.php


示例4: display

    public function display()
    {
        $this->echoOptionHeader();
        $attributes = $this->echoAttributes();
        ?>
		<label for="<?php 
        echo esc_attr($this->getID());
        ?>
">
		<input name="<?php 
        echo esc_attr($this->getID());
        ?>
" type="checkbox" id="<?php 
        echo esc_attr($this->getID());
        ?>
" value="1" <?php 
        checked($this->getValue(), 1);
        echo '' . $attributes;
        ?>
>
		<?php 
        echo ent2ncr($this->getDesc(true));
        ?>
		</label>
		<?php 
        $this->echoOptionFooter(false);
    }
开发者ID:vinhnq1211,项目名称:funy,代码行数:27,代码来源:class-option-checkbox.php


示例5: em_rss

function em_rss()
{
    global $post, $wp_query;
    if (!empty($_REQUEST['dbem_rss']) || is_object($post) && $post->ID == get_option('dbem_events_page') && $wp_query->get('rss')) {
        header("Content-type: text/xml");
        ob_start();
        echo "<?xml version='1.0'?>\n";
        ?>
<rss version="2.0">
	<channel>
		<title><?php 
        echo get_option('dbem_rss_main_title');
        ?>
</title>
		<link><?php 
        echo get_permalink(get_option('dbem_events_page'));
        ?>
</link>
		<description><?php 
        echo get_option('dbem_rss_main_description');
        ?>
</description>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<generator>Weblog Editor 2.0</generator>
				
		<?php 
        $description_format = str_replace(">", "&gt;", str_replace("<", "&lt;", get_option('dbem_rss_description_format')));
        $events = EM_Events::get(array('limit' => 5, 'owner' => false));
        foreach ($events as $event) {
            $description = $event->output(get_option('dbem_rss_description_format'), "rss");
            $description = ent2ncr(convert_chars(strip_tags($description)));
            //Some RSS filtering
            ?>
			<item>
				<title><?php 
            echo $event->output(get_option('dbem_rss_title_format'), "rss");
            ?>
</title>
				<link><?php 
            echo $event->output('#_EVENTURL');
            ?>
</link>
				<description><?php 
            echo $description;
            ?>
</description>
			</item>
			<?php 
        }
        ?>
		
	</channel>
</rss>
		<?php 
        echo apply_filters('em_rss', ob_get_clean());
        die;
    }
}
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:58,代码来源:em-rss.php


示例6: jd_draw_template

function jd_draw_template($array, $template, $type = 'list')
{
    $template = stripcslashes($template);
    foreach ($array as $key => $value) {
        // disallow anything not allowed in posts
        // fields where mc_kses_posts shouldn't run
        $retain = array('map', 'map_url', 'sitelink', 'icon', 'link', 'details_link', 'linking', 'gcal', 'ical_link', 'edit_link', 'register');
        $value = !in_array($key, $retain) ? mc_kses_post($value) : $value;
        if (is_object($value) && !empty($value)) {
            // null values return false...
        } else {
            if (strpos($template, "{" . $key) !== false) {
                if ($type != 'list') {
                    if ($key == 'link' && $value == '') {
                        $value = get_option('mc_uri') != '' && !is_numeric(get_option('mc_uri')) ? get_option('mc_uri') : home_url();
                    }
                    if ($key != 'guid') {
                        $value = htmlentities($value);
                    }
                }
                if (strpos($template, "{" . $key . " ") !== false) {
                    // only do preg_match if appropriate
                    preg_match_all('/{' . $key . '\\b(?>\\s+(?:before="([^"]*)"|after="([^"]*)"|format="([^"]*)")|[^\\s]+|\\s+){0,3}}/', $template, $matches, PREG_PATTERN_ORDER);
                    if ($matches) {
                        $number = count($matches[0]);
                        for ($i = 0; $i <= $number; $i++) {
                            $orig = $value;
                            $before = @$matches[1][$i];
                            $after = @$matches[2][$i];
                            $format = @$matches[3][$i];
                            if ($format != '') {
                                $value = date_i18n(stripslashes($format), strtotime(stripslashes($value)));
                            }
                            $value = $value == '' ? '' : $before . $value . $after;
                            $search = @$matches[0][$i];
                            $template = str_replace($search, $value, $template);
                            $value = $orig;
                        }
                    }
                } else {
                    // don't do preg match (never required for RSS)
                    $template = stripcslashes(str_replace("{" . $key . "}", $value, $template));
                }
            }
            // end {$key check
            // secondary search for RSS output
            $rss_search = "{rss_{$key}}";
            if (strpos($template, $rss_search) !== false) {
                $value = ent2ncr($value);
                // WP native function.
                $template = stripcslashes(str_replace($rss_search, $value, $template));
            }
        }
    }
    return stripslashes(trim($template));
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:56,代码来源:my-calendar-templates.php


示例7: generate_sitemap

 public function generate_sitemap()
 {
     global $wds_options;
     if (is_admin() && defined('WDS_SITEMAP_SKIP_ADMIN_UPDATE') && WDS_SITEMAP_SKIP_ADMIN_UPDATE) {
         return false;
     }
     //this can take a whole lot of time on big blogs
     if (!(defined('WDS_SITEMAP_SKIP_TIME_LIMIT_SETTING') && WDS_SITEMAP_SKIP_TIME_LIMIT_SETTING)) {
         set_time_limit(120);
     }
     if (!$this->_items) {
         $this->_load_all_items();
     }
     $map = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
     if (@$wds_options['sitemap-stylesheet']) {
         $map .= $this->_get_stylesheet('xml-sitemap');
     }
     $image_schema_url = 'http://www.google.com/schemas/sitemap-image/1.1';
     $image_schema = @$wds_options['sitemap-images'] ? "xmlns:image='{$image_schema_url}'" : '';
     $map .= "<urlset xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd' xmlns='http://www.sitemaps.org/schemas/sitemap/0.9' {$image_schema}>\n";
     foreach ($this->_items as $item) {
         $map .= "<url>\n";
         foreach ($item as $key => $val) {
             if ('images' == $key) {
                 if (!$val) {
                     continue;
                 }
                 if (!@$wds_options['sitemap-images']) {
                     continue;
                 }
                 foreach ($item['images'] as $image) {
                     $text = $image['title'] ? $image['title'] : $image['alt'];
                     $map .= "<image:image>";
                     $map .= "<image:loc>" . esc_url($image['src']) . '</image:loc>';
                     $map .= "<image:title>" . ent2ncr($text) . '</image:title>';
                     $map .= "</image:image>\n";
                 }
             } else {
                 $map .= "<{$key}>{$val}</{$key}>\n";
             }
         }
         $map .= "</url>\n\n";
     }
     $map .= "</urlset>";
     if (!$this->_is_admin_mapped()) {
         $this->_write_sitemap($map);
         $this->_postprocess_sitemap();
     } else {
         $file = wds_get_sitemap_path();
         @unlink($file);
         @unlink("{$file}.gz");
     }
 }
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:53,代码来源:wds-sitemaps.php


示例8: rsscloud_notify_result

function rsscloud_notify_result($success, $msg)
{
    $success = strip_tags($success);
    $success = ent2ncr($success);
    $success = esc_html($success);
    $msg = strip_tags($msg);
    $msg = ent2ncr($msg);
    $msg = esc_html($msg);
    header('Content-Type: text/xml');
    echo "<?xml version='1.0'?>\n";
    echo "<notifyResult success='{$success}' msg='{$msg}' />\n";
    exit;
}
开发者ID:voitto,项目名称:dbscript,代码行数:13,代码来源:rsscloud.php


示例9: the_excerpt_rss

 function the_excerpt_rss($content)
 {
     global $post, $EM_Event;
     if ($post->post_type == EM_POST_TYPE_EVENT) {
         if (get_option('dbem_cp_events_formats')) {
             $EM_Event = em_get_event($post);
             $content = $EM_Event->output(get_option('dbem_rss_description_format'), "rss");
             $content = ent2ncr(convert_chars($content));
             //Some RSS filtering
         }
     }
     return $content;
 }
开发者ID:hscale,项目名称:webento,代码行数:13,代码来源:em-event-post.php


示例10: jd_draw_template

function jd_draw_template($array, $template, $type = 'list')
{
    $template = stripcslashes($template);
    foreach ($array as $key => $value) {
        if (is_object($value) && !empty($value)) {
            // null values return false...
        } else {
            if (strpos($template, "{" . $key) !== false) {
                if ($type != 'list') {
                    if ($key == 'link' && $value == '') {
                        $value = get_option('mc_uri') != '' && !is_numeric(get_option('mc_uri')) ? get_option('mc_uri') : home_url();
                    }
                    if ($key != 'guid') {
                        $value = htmlentities($value);
                    }
                }
                if (strpos($template, "{" . $key . " ") !== false) {
                    // only do preg_match if appropriate
                    preg_match_all('/{' . $key . '\\b(?>\\s+(?:before="([^"]*)"|after="([^"]*)"|format="([^"]*)")|[^\\s]+|\\s+){0,2}}/', $template, $matches, PREG_PATTERN_ORDER);
                    if ($matches) {
                        $before = @$matches[1][0];
                        $after = @$matches[2][0];
                        $format = @$matches[3][0];
                        if ($format != '') {
                            $value = date_i18n(stripslashes($format), strtotime(stripslashes($value)));
                        }
                        $value = $value == '' ? '' : $before . $value . $after;
                        $search = @$matches[0][0];
                        $template = str_replace($search, $value, $template);
                    }
                } else {
                    // don't do preg match (never required for RSS)
                    $template = stripcslashes(str_replace("{" . $key . "}", $value, $template));
                }
            }
            // end {$key check
            // secondary search for RSS output
            $rss_search = "{rss_{$key}}";
            if (strpos($template, $rss_search) !== false) {
                $charset = get_option('blog_charset');
                if ($charset == '') {
                    $charset = 'UTF-8';
                }
                $value = ent2ncr($value);
                // WP native function.
                $template = stripcslashes(str_replace($rss_search, $value, $template));
            }
        }
    }
    return stripslashes(trim($template));
}
开发者ID:newmight2015,项目名称:psmpsm,代码行数:51,代码来源:my-calendar-templates.php


示例11: franz_title

/**
 * This function prints out the title for the website.
 * If present, the theme will display customised site title structure.
*/
function franz_title($title, $sep = '-', $seplocation = '')
{
    global $franz_settings;
    $default_title = $title;
    if (is_feed()) {
        $title = $default_title;
    } elseif (is_front_page()) {
        $title = get_bloginfo('name');
        $title .= ($desc = get_bloginfo('description')) ? " - " . $desc : '';
    } else {
        $title = $default_title . " - " . get_bloginfo('name');
    }
    return ent2ncr(apply_filters('franz_title', trim($title)));
}
开发者ID:ravitechrlabs,项目名称:wordpress,代码行数:18,代码来源:head.php


示例12: wpi_get_author_name

/**
 *  author display_name
 *  
 */
function wpi_get_author_name($type = 'hcard')
{
    global $authordata;
    $name = $display_name = apply_filters('the_author', $authordata->display_name);
    $name = $display_name = ent2ncr(htmlentities2($name));
    $author_url = $authordata->user_url;
    $author_url = $author_url != 'http://' ? $author_url : WPI_URL;
    switch ($type) {
        case 'link':
            /** simple links
             *	
             */
            $attribs = array('href' => $author_url, 'class' => 'url fn dc-creator', 'rel' => 'colleague foaf.homepage foaf.maker', 'title' => 'Visit ' . $display_name . '&apos;s Website', 'rev' => 'author:' . $authordata->user_nicename);
            $output = _t('a', $display_name, $attribs);
            break;
        case 'hcard':
            /** convert to microformats
             *	address:a:span
             */
            // split the name
            $name = explode('name', $name);
            if (is_array($name)) {
                if (Wpi::hasCount($name)) {
                    if (isset($name[0])) {
                        $output = _t('span', $name[0], array('class' => 'nickname'));
                    }
                    if (isset($name[1])) {
                        $output = _t('span', $name[0], array('class' => 'given-name')) . ' ';
                        $output .= _t('span', $name[1], array('class' => 'family-name'));
                    }
                }
            } else {
                $output = _t('span', $author_name, array('class' => 'nickname'));
            }
            // author post url;
            $url = get_author_posts_url($authordata->ID, $authordata->user_nicename);
            $url = apply_filters(wpiFilter::FILTER_LINKS, $url);
            $attribs = array('href' => $url, 'class' => 'url fn dc-creator', 'rel' => 'colleague foaf.homepage foaf.maker', 'title' => 'Visit ' . $display_name . '&apos;s Author page', 'rev' => 'author:' . $authordata->user_nicename);
            $output = _t('a', $output, $attribs);
            // microID sha-1 hash
            $hash = get_microid_hash($authordata->user_email, $author_url);
            // wrap hcard
            $output = _t('cite', $output, array('class' => 'vcard microid-' . $hash));
            break;
        default:
            $output = $name;
            break;
    }
    return apply_filters(wpiFilter::FILTER_AUTHOR_NAME . $type, $output);
}
开发者ID:Creativebq,项目名称:wp-istalker,代码行数:54,代码来源:author.php


示例13: display

    public function display()
    {
        if (!empty($this->owner->postID)) {
            return;
        }
        if (empty($this->settings['save'])) {
            $this->settings['save'] = __('Save Changes', 'thim');
        }
        if (empty($this->settings['reset'])) {
            $this->settings['reset'] = __('Reset to Defaults', 'thim');
        }
        if (empty($this->settings['reset_question'])) {
            $this->settings['reset_question'] = __('Are you sure you want to reset ALL options to their default values?', 'thim');
        }
        ?>
		</tbody>
		</table>

		<p class='submit'>
			<button name="action" value="<?php 
        echo esc_html($this->settings['action']);
        ?>
" class="button button-primary">
				<?php 
        echo ent2ncr($this->settings['save']);
        ?>
			</button>

			<?php 
        if ($this->settings['use_reset']) {
            ?>
			<button name="action" class="button button-secondary"
				onclick="javascript: if ( confirm( '<?php 
            echo htmlentities(esc_attr($this->settings['reset_question']));
            ?>
' ) ) { jQuery( '#tf-reset-form' ).submit(); } jQuery(this).blur(); return false;">
				<?php 
            echo ent2ncr($this->settings['reset']);
            ?>
			</button>
			<?php 
        }
        ?>
		</p>

		<table class='form-table'>
			<tbody>
		<?php 
    }
开发者ID:vinhnq1211,项目名称:funy,代码行数:49,代码来源:class-option-save.php


示例14: wp_title_rss_filter

 /**
  * Fix double title in rss
  */
 public function wp_title_rss_filter($title)
 {
     if (!tfuse_options('enable_tfuse_seo_tab', true)) {
         return $title;
     }
     $exploded = explode($this->bloginfo_rss_name, ent2ncr($title));
     if (!$exploded[0]) {
         array_shift($exploded);
     }
     if (sizeof($exploded) > 1) {
         $title = implode(bloginfo_rss('name'), $exploded);
     } else {
         $title = implode('', $exploded);
     }
     return $title;
 }
开发者ID:part-time-project,项目名称:italians,代码行数:19,代码来源:TF_SEO.php


示例15: thim_customizer_export_theme_settings

function thim_customizer_export_theme_settings()
{
    $blogname = strtolower(str_replace(' ', '-', get_option('blogname')));
    $file_name = $blogname . '-thimtheme-' . date('Ydm') . '.json';
    $options = get_theme_mods();
    unset($options['nav_menu_locations']);
    foreach ($options as $key => $value) {
        $value = maybe_unserialize($value);
        $need_options[$key] = $value;
    }
    $json_file = json_encode($need_options);
    ob_clean();
    header('Content-Type: text/json; charset=' . get_option('blog_charset'));
    header('Content-Disposition: attachment; filename="' . $file_name . '"');
    echo ent2ncr($json_file);
    exit;
}
开发者ID:vinhnq1211,项目名称:funy,代码行数:17,代码来源:export-settings.php


示例16: csg_sitemap

function csg_sitemap()
{
    // Create empty string
    $sitemap = '';
    // Sanitize and escape input
    $frequency = sanitize_option('frequency', $_POST['frequency']);
    $frequency = esc_html($frequency);
    // And finally, check if its a safe value
    $check_input = $frequency;
    $safe_values = array('always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never');
    if (in_array($check_input, $safe_values, true)) {
        // Add basic XML output
        $sitemap .= '<?xml version="1.0" encoding="UTF-8"?>
		<urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
        // Add homepage
        $sitemap .= '
			<url>
			<loc>' . get_site_url() . '/</loc>
			<changefreq>' . $frequency . '</changefreq>
			</url>
		';
        // Add pages
        // Arguments for selecting pages
        $args = array('post_type' => 'page', 'posts_per_page' => 9000);
        // The Query
        query_posts($args);
        // The Loop
        while (have_posts()) {
            the_post();
            $sitemap .= '
				<url>
				<loc>' . get_the_permalink() . '</loc>
				<changefreq>' . $frequency . '</changefreq>
				</url>
			';
        }
        $sitemap .= '</urlset>';
        // Reset Query
        wp_reset_query();
    } else {
        wp_die('Invalid data');
        // If the frequency is not accepted, return error
    }
    // Return sitemap-string but first filter any text containing illegal named entities
    return ent2ncr($sitemap);
}
开发者ID:DakelNL,项目名称:sitemap-generator,代码行数:46,代码来源:companion_sitemap.php


示例17: parse

 function parse($file)
 {
     // Attempt to use proper XML parsers first
     if (extension_loaded('simplexml')) {
         $parser = new WXR_Parser_SimpleXML();
         $result = $parser->parse($file);
         // If SimpleXML succeeds or this is an invalid WXR file then return the results
         if (!is_wp_error($result) || 'SimpleXML_parse_error' != $result->get_error_code()) {
             return $result;
         }
     } else {
         if (extension_loaded('xml')) {
             $parser = new WXR_Parser_XML();
             $result = $parser->parse($file);
             // If XMLParser succeeds or this is an invalid WXR file then return the results
             if (!is_wp_error($result) || 'XML_parse_error' != $result->get_error_code()) {
                 return $result;
             }
         }
     }
     // We have a malformed XML file, so display the error and fallthrough to regex
     if (isset($result) && defined('IMPORT_DEBUG') && IMPORT_DEBUG) {
         echo '<pre>';
         if ('SimpleXML_parse_error' == $result->get_error_code()) {
             foreach ($result->get_error_data() as $error) {
                 echo ent2ncr($error->line . ':' . $error->column . ' ' . esc_html($error->message) . "\n");
             }
         } else {
             if ('XML_parse_error' == $result->get_error_code()) {
                 $error = $result->get_error_data();
                 echo ent2ncr($error[0] . ':' . $error[1] . ' ' . esc_html($error[2]));
             }
         }
         echo '</pre>';
         echo '<p><strong>' . __('There was an error when reading this WXR file', 'wordpress-importer') . '</strong><br />';
         echo __('Details are shown above. The importer will now try again with a different parser...', 'wordpress-importer') . '</p>';
     }
     // use regular expressions if nothing else available or this is bad XML
     $parser = new WXR_Parser_Regex();
     return $parser->parse($file);
 }
开发者ID:vinhnq1211,项目名称:funy,代码行数:41,代码来源:parsers.php


示例18: render_content

        public function render_content()
        {
            ?>
			<label>
				<span class="customize-control-title"><?php 
            echo esc_html($this->label);
            ?>
</span>
				<textarea class='large-text <?php 
            echo ent2ncr($this->is_code ? 'code' : '');
            ?>
' rows='7' cols='50' <?php 
            $this->link();
            ?>
><?php 
            echo esc_textarea(stripslashes($this->value()));
            ?>
</textarea>
			</label>
			<?php 
            echo "<p class='description'>{$this->description}</p>";
        }
开发者ID:vinhnq1211,项目名称:funy,代码行数:22,代码来源:class-option-textarea.php


示例19: display

    public function display($post)
    {
        $this->postID = $post->ID;
        wp_nonce_field($this->settings['id'], TF . '_' . $this->settings['id'] . '_nonce');
        if (!empty($this->settings['desc'])) {
            ?>
<p class='description'><?php 
            echo ent2ncr($this->settings['desc']);
            ?>
</p><?php 
        }
        ?>
		<table class="form-table tf-form-table">
		<tbody>
		<?php 
        foreach ($this->options as $option) {
            $option->display();
        }
        ?>
		</tbody>
		</table>
		<?php 
    }
开发者ID:vinhnq1211,项目名称:funy,代码行数:23,代码来源:class-meta-box.php


示例20: printJSForPagesAndPosts

    /**
     * Prints javascript code in the header for meta options using wp_print_scripts
     *
     * @return	void
     * @since	1.3
     */
    public function printJSForPagesAndPosts()
    {
        // This is for meta box options only, other types get generated normally
        if (TitanFrameworkOption::TYPE_META != $this->type) {
            return;
        }
        // For CSS langs only
        if ($this->settings['lang'] != 'javascript') {
            return;
        }
        // Don't generate CSS for non-pages and non-posts
        $id = get_the_ID();
        if (empty($id) || 1 == $id) {
            return;
        }
        ?>
		<script>
		<?php 
        echo ent2ncr($this->getFramework()->getOption($this->settings['id'], $id));
        ?>
		</script>
		<?php 
    }
开发者ID:vinhnq1211,项目名称:funy,代码行数:29,代码来源:class-option-code.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP enter函数代码示例发布时间:2022-05-15
下一篇:
PHP ensure_role函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap