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


PHP _ex函数代码示例

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


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

示例1: form

 public function form($instance)
 {
     printf('<p><label for="%s">%s</label> <input class="widefat" id="%s" name="%s" type="text" value="%s" /></p>', $this->get_field_id('title'), _x('Title:', 'widgets', 'WPBDM'), $this->get_field_id('title'), $this->get_field_name('title'), esc_attr($this->get_field_value($instance, 'title')));
     printf('<p><label for="%s">%s</label> <input id="%s" name="%s" type="text" value="%s" size="5" /></p>', $this->get_field_id('number_of_listings'), _x('Number of listings to display:', 'widgets', 'WPBDM'), $this->get_field_id('number_of_listings'), $this->get_field_name('number_of_listings'), intval($this->get_field_value($instance, 'number_of_listings')));
     $this->_form($instance);
     if (in_array('images', $this->supports)) {
         echo '<h4>';
         _ex('Thumbnails', 'widgets', 'WPBDM');
         echo '</h4>';
         printf('<p><input id="%s" class="wpbdp-toggle-images" name="%s" type="checkbox" value="1" %s /> <label for="%s">%s</label></p>', $this->get_field_id('show_images'), $this->get_field_name('show_images'), $this->get_field_value($instance, 'show_images') ? 'checked="checked"' : '', $this->get_field_id('show_images'), _x('Show thumbnails', 'widgets', 'WPBDM'));
         echo '<p class="thumbnail-width-config" style="' . ($this->get_field_value($instance, 'show_images') ? '' : 'display: none;') . '">';
         echo '<label for="' . $this->get_field_id('thumbnail_width') . '">';
         _ex('Image width (in px):', 'widgets', 'WPBDM');
         echo '</label> ';
         printf('<input type="text" name="%s" id="%s" value="%s" size="5" />', $this->get_field_name('thumbnail_width'), $this->get_field_id('thumbnail_width'), $this->get_field_value($instance, 'thumbnail_width'));
         echo '<br /><span class="help">' . _x('Leave blank for automatic width.', 'widgets', 'WPBDM') . '</span>';
         echo '</p>';
         echo '<p class="thumbnail-height-config" style="' . ($this->get_field_value($instance, 'show_images') ? '' : 'display: none;') . '">';
         echo '<label for="' . $this->get_field_id('thumbnail_height') . '">';
         _ex('Image height (in px):', 'widgets', 'WPBDM');
         echo '</label> ';
         printf('<input type="text" name="%s" id="%s" value="%s" size="5" />', $this->get_field_name('thumbnail_height'), $this->get_field_id('thumbnail_height'), $this->get_field_value($instance, 'thumbnail_height'));
         echo '<br /><span class="help">' . _x('Leave blank for automatic height.', 'widgets', 'WPBDM') . '</span>';
         echo '</p>';
     }
 }
开发者ID:Nedick,项目名称:stzagora-website,代码行数:26,代码来源:class-listings-widget.php

示例2: themecheck_do_page

    function themecheck_do_page()
    {
        if (!current_user_can('manage_options')) {
            wp_die(__('You do not have sufficient permissions to access this page.', 'theme-check'));
        }
        add_filter('extra_theme_headers', array($this, 'tc_add_headers'));
        include 'checkbase.php';
        include 'main.php';
        ?>
		<div id="theme-check" class="wrap">
		<h1><?php 
        _ex('Theme Check', 'title of the main page', 'theme-check');
        ?>
</h1>
		<div class="theme-check">
		<?php 
        tc_form();
        if (!isset($_POST['themename'])) {
            tc_intro();
        }
        if (isset($_POST['themename'])) {
            if (isset($_POST['trac'])) {
                define('TC_TRAC', true);
            }
            if (defined('WP_MAX_MEMORY_LIMIT')) {
                @ini_set('memory_limit', WP_MAX_MEMORY_LIMIT);
            }
            check_main($_POST['themename']);
        }
        ?>
		</div> <!-- .theme-check-->
		</div>
		<?php 
    }
开发者ID:dawnthemes,项目名称:tkb,代码行数:34,代码来源:theme-check.php

示例3: render_content

    /**
     * Renders the control's content.
     *
     * @since 3.9.0
     * @access public
     */
    public function render_content()
    {
        $id = 'reorder-widgets-desc-' . str_replace(array('[', ']'), array('-', ''), $this->id);
        ?>
		<button type="button" class="button-secondary add-new-widget" aria-expanded="false" aria-controls="available-widgets">
			<?php 
        _e('Add a Widget');
        ?>
		</button>
		<button type="button" class="button-link reorder-toggle" aria-label="<?php 
        esc_attr_e('Reorder widgets');
        ?>
" aria-describedby="<?php 
        echo esc_attr($id);
        ?>
">
			<span class="reorder"><?php 
        _ex('Reorder', 'Reorder widgets in Customizer');
        ?>
</span>
			<span class="reorder-done"><?php 
        _ex('Done', 'Cancel reordering widgets in Customizer');
        ?>
</span>
		</button>
		<p class="screen-reader-text" id="<?php 
        echo esc_attr($id);
        ?>
"><?php 
        _e('When in reorder mode, additional controls to reorder widgets will be available in the widgets list above.');
        ?>
</p>
		<?php 
    }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:40,代码来源:class-wp-widget-area-customize-control.php

示例4: cat_description

/**
 * Outputs the new taxonomy description field as a TinyMCE
 * editor instead of a plain textarea.
 *
 * @param $tag
 * @return none
 */
function cat_description($tag)
{
    ?>
    <table class="form-table">
        <tr class="form-field">
            <th scope="row" valign="top"><label for="description"><?php 
    _ex('Description', 'Taxonomy Description');
    ?>
</label></th>
            <td>
                <?php 
    $settings = array('wpautop' => true, 'media_buttons' => true, 'quicktags' => true, 'textarea_rows' => '15', 'textarea_name' => 'description');
    // We need to use html_entity_decode on the content before wp_editor,
    // otherwise TinyMCEwill convert all of our HTML tags into HTML entities
    // and you'll actually see the HTML tags in the WYSIWYG editor as text.
    $content = html_entity_decode($tag->description);
    wp_editor(wp_kses_post($content, ENT_QUOTES, 'UTF-8'), 'cat_description', $settings);
    ?>
                <br />
                <span class="description"><?php 
    _e('The description is not prominent by default; however, some themes may show it.');
    ?>
</span>
            </td>
        </tr>
    </table>
<?php 
}
开发者ID:bdeleasa,项目名称:category-description-wysiwyg,代码行数:35,代码来源:category-description-wysiwyg.php

示例5: _before_table_edit

        function _before_table_edit($form, $results = true)
        {
            ?>
	<p><?php 
            _e('This module isn\'t limited to just static HTML content. You can also use shortcodes and PHP code to add generated content. PHP support must first be activated with the Enable PHP option below.', 'it-l10n-Builder-Cohen');
            ?>
</p>
	<p><?php 
            _e('Using shortcodes is preferred over PHP code as allowing PHP code has security risks.', 'it-l10n-Builder-Cohen');
            ?>
</p>
	
	<p>
		<label for="html"><?php 
            _ex('HTML', 'module', 'it-l10n-Builder-Cohen');
            ?>
</label>
		<br />
		<?php 
            $form->add_text_area('html', array('style' => 'width:100%; max-width:100%; min-height:100px;', 'rows' => '10'));
            ?>
	</p>
	<br />
<?php 
        }
开发者ID:jimrucinski,项目名称:Vine,代码行数:25,代码来源:module.php

示例6: upload_file

        function upload_file($settings, $value)
        {
            ob_start();
            ?>

			<div class="select_fa_icon_bb_param_block">
				<input name="<?php 
            echo esc_attr($settings['param_name']);
            ?>
" class="wpb_vc_param_value wpb-textinput <?php 
            echo esc_attr($settings['param_name']) . ' ' . esc_attr($settings['type']);
            ?>
_field" id="<?php 
            echo esc_attr($settings['param_name']);
            ?>
" type="text" value="<?php 
            echo esc_attr($value);
            ?>
" />
				<input type="button" onclick="ProteusWidgetsUploader.fileUploader.openFileFrame( '<?php 
            echo esc_attr($settings['param_name']);
            ?>
' );" class="upload-brochure-file button button-secondary" value="<?php 
            _ex('Upload file', 'backend', 'vc-elements-pt');
            ?>
" />
			</div>

			<?php 
            return ob_get_clean();
        }
开发者ID:proteusthemes,项目名称:visual-composer-elements,代码行数:31,代码来源:class-vc-custom-param-types.php

示例7: render_content

    /**
     * Render the control's content.
     *
     * @since Menu Customizer 0.0
     */
    public function render_content()
    {
        $id = absint($this->menu_id);
        ?>

		<span class="button-secondary add-new-menu-item" tabindex="0">
			<?php 
        _e('Add Links');
        ?>
		</span>

		<span class="add-menu-item-loading spinner"></span>

		<span class="reorder-toggle" tabindex="0">
			<span class="reorder"><?php 
        _ex('Reorder', 'Reorder menu items in Customizer');
        ?>
</span>
			<span class="reorder-done"><?php 
        _ex('Done', 'Cancel reordering menu items in Customizer');
        ?>
</span>
		</span>

		<span class="menu-delete" id="delete-menu-<?php 
        echo $id;
        ?>
" tabindex="0">
			<span class="screen-reader-text"><?php 
        printf(__("Delete menu: %s"), wp_get_nav_menu_object($id)->name);
        ?>
 </span>
		</span>
	<?php 
    }
开发者ID:dauidus,项目名称:woof,代码行数:40,代码来源:menu-customize-controls.php

示例8: kws_add_form

function kws_add_form($taxonomy = '')
{
    global $pagenow;
    $content = is_object($taxonomy) && isset($taxonomy->description) ? $taxonomy->description : '';
    $content = html_entity_decode($content);
    if ($pagenow == 'edit-tags.php') {
        $editor_id = 'tag_description';
        $editor_selector = 'description';
    } else {
        $editor_id = $editor_selector = 'category_description';
    }
    $css = '
<style type="text/css">
	.wp-editor-container .quicktags-toolbar input.ed_button {
		width:auto;
	}
	.html-active .wp-editor-area { border:0;}
</style>';
    ?>
<tr class="form-field">
	<th scope="row" valign="top"><label for="description"><?php 
    _ex('Description', 'Taxonomy Description');
    ?>
</label></th>
	<td><?php 
    wp_editor($content, $editor_id, array('textarea_name' => $editor_selector, 'editor_css' => $css));
    ?>
<br />
	<span class="description"><?php 
    _e('The description is not prominent by default, however some themes may show it.');
    ?>
</span></td>
</tr>
<?php 
}
开发者ID:andychang88,项目名称:jianzhanseo.com,代码行数:35,代码来源:rich-text-tags.php

示例9: install_premium_woocommerce_admin_notice

    /**
     * Print an admin notice if woocommerce is deactivated
     *
     * @author Andrea Grillo <andrea.grillo@yithemes.com>
     * @since 1.0
     * @return void
     * @use admin_notices hooks
     */
    function install_premium_woocommerce_admin_notice()
    {
        ?>
        <div class="error">
            <p><?php 
        _ex('YITH WooCommerce Multi-step Chekcout is enabled but not effective. It requires WooCommerce in order to work.', 'Alert Message: WooCommerce require', 'yith_wcms');
        ?>
</p>
        </div>
        <?php 
    }
开发者ID:patrickcurl,项目名称:monks,代码行数:19,代码来源:init.php

示例10: form

    function form($instance)
    {
        $instance = wp_parse_args((array) $instance, array('title' => ''));
        $title = isset($instance['title']) ? esc_attr($instance['title']) : '';
        $user = isset($instance['user']) ? esc_attr($instance['user']) : 'TeslaThemes';
        $number = isset($instance['number']) ? absint($instance['number']) : 3;
        ?>
        <p>
            <label><?php 
        _ex('Title:', 'dashboard', 'sevenfold');
        ?>
<input class="widefat" name="<?php 
        echo $this->get_field_name('title');
        ?>
" type="text" value="<?php 
        echo esc_attr($title);
        ?>
" /></label> 
            <label><?php 
        _ex('Twitter user:', 'dashboard', 'sevenfold');
        ?>
<input class="widefat" name="<?php 
        echo $this->get_field_name('user');
        ?>
" type="text" value="<?php 
        echo esc_attr($user);
        ?>
" /></label> 
            <label for="<?php 
        echo $this->get_field_id('number');
        ?>
">
                <?php 
        _ex('Number of tweets to show:', 'dashboard', 'sevenfold');
        ?>
                <input id="<?php 
        echo $this->get_field_id('number');
        ?>
" name="<?php 
        echo $this->get_field_name('number');
        ?>
" type="text" value="<?php 
        echo $number;
        ?>
" size="3" />
            </label>
        </p>
        <p>Don't forget to configure the twitter in the Framework.</p>
        <?php 
    }
开发者ID:Eluminae,项目名称:PTUT-plugin-scientifique-WordPress,代码行数:50,代码来源:widget-twitter.php

示例11: install_theme_search_form

/**
 * Display search form for searching themes.
 *
 * @since 2.8.0
 */
function install_theme_search_form($type_selector = true)
{
    $type = isset($_REQUEST['type']) ? stripslashes($_REQUEST['type']) : 'term';
    $term = isset($_REQUEST['s']) ? stripslashes($_REQUEST['s']) : '';
    if (!$type_selector) {
        echo '<p class="install-help">' . __('Search for themes by keyword.') . '</p>';
    }
    ?>
<form id="search-themes" method="get" action="">
	<input type="hidden" name="tab" value="search" />
	<?php 
    if ($type_selector) {
        ?>
	<select	name="type" id="typeselector">
	<option value="term" <?php 
        selected('term', $type);
        ?>
><?php 
        _e('Keyword');
        ?>
</option>
	<option value="author" <?php 
        selected('author', $type);
        ?>
><?php 
        _e('Author');
        ?>
</option>
	<option value="tag" <?php 
        selected('tag', $type);
        ?>
><?php 
        _ex('Tag', 'Theme Installer');
        ?>
</option>
	</select>
	<?php 
    }
    ?>
	<input type="search" name="s" size="30" value="<?php 
    echo esc_attr($term);
    ?>
" />
	<?php 
    submit_button(__('Search'), 'button', 'search', false);
    ?>
</form>
<?php 
}
开发者ID:nzeyimana,项目名称:WordPress,代码行数:54,代码来源:theme-install.php

示例12: add

    /**
     * @add the editor
     */
    function add($term, $taxonomy)
    {
        ?>
		<tr class="form-field tp-term-description-editor">
			<th scope="row" valign="top"><label for="description"><?php 
        _ex('Description', 'Taxonomy Description');
        ?>
</label></th>
			<td><?php 
        wp_editor(html_entity_decode($term->description, null, 'UTF-8'), 'tp-description', array('textarea_name' => 'description', 'quicktags' => false));
        ?>
</td>
		</tr>
		<?php 
    }
开发者ID:trendwerk,项目名称:term-description-editor,代码行数:18,代码来源:class-tp-term-description-editor.php

示例13: widget

	public function widget( $args, $instance ) {
		if ( ! has_post_format( 'gallery', $instance['post_id'] ) ) return;

		$attachments = get_children( array(
			'post_parent'		=>	$instance['post_id'],
			'post_status'		=>	'inherit',
			'post_type'			=>	'attachment',
			'post_mime_type'	=>	'image',
			'order'				=>	'ASC',
			'orderby'			=>	'menu_order ID',
		) );
		if ( empty( $attachments ) ) return;
		
		extract( $args );
		
		echo   str_replace( 'well ', '', $before_widget );
		
		if ( $title = get_the_title( $instance['post_id'] ) )
			echo $before_title . '<a href="' . get_permalink( $instance['post_id'] ) . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'the-bootstrap' ), strip_tags( $title ) ) . '" rel="bookmark">' . $title . '</a>' . $after_title;
		?>
		<div id="sidebar-gallery-slider" class="carousel slide">

			<!-- Carousel items -->
			<div class="carousel-inner">
				<?php foreach ( $attachments as $attachment ) : ?>
				<figure class="item">
					<?php echo wp_get_attachment_image( $attachment->ID, array( 370, 278 ) ); 
					if ( has_excerpt( $attachment->ID ) ) : ?>
					<figcaption class="carousel-caption">
						<h4><?php echo get_the_title( $attachment->ID ); ?></h4>
						<p><?php echo apply_filters( 'get_the_excerpt', $attachment->post_excerpt ); ?></p>
					</figcaption>
					<?php endif; ?>
				</figure>
				<?php endforeach; ?>
			</div><!-- .carousel-inner -->
		
			<!-- Carousel nav -->
			<a class="carousel-control left" href="#sidebar-gallery-slider" data-slide="prev"><?php _ex( '&lsaquo;', 'carousel-control', 'the-bootstrap' ); ?></a>
			<a class="carousel-control right" href="#sidebar-gallery-slider" data-slide="next"><?php _ex( '&rsaquo;', 'carousel-control', 'the-bootstrap' ); ?></a>
		</div><!-- #sidebar-gallery-slider .carousel .slide -->
		<?php
		
		echo $after_widget;
	}
开发者ID:OanaRaluca,项目名称:Wordpress-theme-8,代码行数:45,代码来源:the-bootstrap-gallery-widget.php

示例14: call_some_i18n_methods

function call_some_i18n_methods()
{
    __('Hello World', 'test-domain');
    _e('Hello World', 'test-domain');
    _n('Single', 'Plural', 1, 'test-domain');
    _n_noop('Single Noop', 'Plural Noop', 1, 'test-domain');
    _x('Hello World', 'Testing', 'test-domain');
    _ex('Hello World', 'Testing', 'test-domain');
    _nx('Hello World', 'Testing', 'test-domain');
    _nx_noop('Hello World Noop', 'Testing', 'test-domain');
    esc_attr__('Attribute', 'test-domain');
    esc_html__('HTML', 'test-domain');
    esc_attr_e('Attribute', 'test-domain');
    esc_html_e('HTML', 'test-domain');
    esc_attr_x('Attribute', 'Testing', 'test-domain');
    esc_html_x('HTML', 'Testing', 'test-domain');
    translate_nooped_plural('Plural Noop', 2, 'test-domain');
}
开发者ID:dd32,项目名称:wordpress.develop,代码行数:18,代码来源:add-textdomain-0-result.php

示例15: pt_docs_page_output

    function pt_docs_page_output()
    {
        ?>
		<div class="wrap">
			<h2><?php 
        _ex('Documentation', 'backend', 'carpress_wp');
        ?>
</h2>

			<p>
				<strong><a href="http://www.proteusthemes.com/docs/carpress/" class="button button-primary " target="_blank"><?php 
        _ex('Click here to see online documentation of the theme!', 'backend', 'carpress_wp');
        ?>
</a></strong>
			</p>
		</div>
		<?php 
    }
开发者ID:virendrayadav,项目名称:mutare,代码行数:18,代码来源:documentation-link.php


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