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

PHP get_echo函数代码示例

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

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



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

示例1: test_comment_meta_should_be_lazy_loaded_for_all_comments_in_comments_template

 /**
  * @ticket 16894
  */
 public function test_comment_meta_should_be_lazy_loaded_for_all_comments_in_comments_template()
 {
     global $wpdb;
     $p = $this->factory->post->create(array('post_status' => 'publish'));
     $comment_ids = $this->factory->comment->create_post_comments($p, 3);
     foreach ($comment_ids as $cid) {
         update_comment_meta($cid, 'sauce', 'fire');
     }
     $this->go_to(get_permalink($p));
     if (have_posts()) {
         while (have_posts()) {
             the_post();
             // Load comments with `comments_template()`.
             $cform = get_echo('comments_template');
             // First request will hit the database.
             $num_queries = $wpdb->num_queries;
             get_comment_meta($comment_ids[0], 'sauce');
             $this->assertSame($num_queries + 1, $wpdb->num_queries);
             // Second and third requests should be in cache.
             get_comment_meta($comment_ids[1], 'sauce');
             get_comment_meta($comment_ids[2], 'sauce');
             $this->assertSame($num_queries + 1, $wpdb->num_queries);
         }
     }
 }
开发者ID:plis197715,项目名称:wordpress-develop,代码行数:28,代码来源:metaCache.php


示例2: test_the_excerpt_password_protected_post

 /**
  * @ticket 27246
  * @ticket 35486
  */
 public function test_the_excerpt_password_protected_post()
 {
     $post = self::factory()->post->create_and_get(array('post_excerpt' => 'Post excerpt', 'post_password' => '1234'));
     $this->assertSame('There is no excerpt because this is a protected post.', get_the_excerpt($post));
     $GLOBALS['post'] = $post;
     $this->assertSame("<p>There is no excerpt because this is a protected post.</p>\n", get_echo('the_excerpt'));
 }
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:11,代码来源:getTheExcerpt.php


示例3: test_protocols

 /**
  * Test the different protocol references in wp_enqueue_style
  * @global WP_Styles $wp_styles
  * @ticket 16560
  */
 public function test_protocols()
 {
     // Init
     global $wp_styles;
     $base_url_backup = $wp_styles->base_url;
     $wp_styles->base_url = 'http://example.com/wordpress';
     $expected = '';
     $ver = get_bloginfo('version');
     // Try with an HTTP reference
     wp_enqueue_style('reset-css-http', 'http://yui.yahooapis.com/2.8.1/build/reset/reset-min.css');
     $expected .= "<link rel='stylesheet' id='reset-css-http-css'  href='http://yui.yahooapis.com/2.8.1/build/reset/reset-min.css?ver={$ver}' type='text/css' media='all' />\n";
     // Try with an HTTPS reference
     wp_enqueue_style('reset-css-https', 'http://yui.yahooapis.com/2.8.1/build/reset/reset-min.css');
     $expected .= "<link rel='stylesheet' id='reset-css-https-css'  href='http://yui.yahooapis.com/2.8.1/build/reset/reset-min.css?ver={$ver}' type='text/css' media='all' />\n";
     // Try with an automatic protocol reference (//)
     wp_enqueue_style('reset-css-doubleslash', '//yui.yahooapis.com/2.8.1/build/reset/reset-min.css');
     $expected .= "<link rel='stylesheet' id='reset-css-doubleslash-css'  href='//yui.yahooapis.com/2.8.1/build/reset/reset-min.css?ver={$ver}' type='text/css' media='all' />\n";
     // Try with a local resource and an automatic protocol reference (//)
     $url = '//my_plugin/style.css';
     wp_enqueue_style('plugin-style', $url);
     $expected .= "<link rel='stylesheet' id='plugin-style-css'  href='{$url}?ver={$ver}' type='text/css' media='all' />\n";
     // Try with a bad protocol
     wp_enqueue_style('reset-css-ftp', 'ftp://yui.yahooapis.com/2.8.1/build/reset/reset-min.css');
     $expected .= "<link rel='stylesheet' id='reset-css-ftp-css'  href='{$wp_styles->base_url}ftp://yui.yahooapis.com/2.8.1/build/reset/reset-min.css?ver={$ver}' type='text/css' media='all' />\n";
     // Go!
     $this->assertEquals($expected, get_echo('wp_print_styles'));
     // No styles left to print
     $this->assertEquals('', get_echo('wp_print_styles'));
     // Cleanup
     $wp_styles->base_url = $base_url_backup;
 }
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:36,代码来源:styles.php


示例4: test_protocols

 /**
  * Test the different protocol references in wp_enqueue_script
  * @global WP_Scripts $wp_scripts
  * @ticket 16560
  */
 public function test_protocols()
 {
     // Init
     global $wp_scripts;
     $base_url_backup = $wp_scripts->base_url;
     $wp_scripts->base_url = 'http://example.com/wordpress';
     $expected = '';
     $ver = get_bloginfo('version');
     // Try with an HTTP reference
     wp_enqueue_script('jquery-http', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
     $expected .= "<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver={$ver}'></script>\n";
     // Try with an HTTPS reference
     wp_enqueue_script('jquery-https', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
     $expected .= "<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver={$ver}'></script>\n";
     // Try with an automatic protocol reference (//)
     wp_enqueue_script('jquery-doubleslash', '//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
     $expected .= "<script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver={$ver}'></script>\n";
     // Try with a local resource and an automatic protocol reference (//)
     $url = '//my_plugin/script.js';
     wp_enqueue_script('plugin-script', $url);
     $expected .= "<script type='text/javascript' src='{$url}?ver={$ver}'></script>\n";
     // Try with a bad protocol
     wp_enqueue_script('jquery-ftp', 'ftp://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
     $expected .= "<script type='text/javascript' src='{$wp_scripts->base_url}ftp://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver={$ver}'></script>\n";
     // Go!
     $this->assertEquals($expected, get_echo('wp_print_scripts'));
     // No scripts left to print
     $this->assertEquals('', get_echo('wp_print_scripts'));
     // Cleanup
     $wp_scripts->base_url = $base_url_backup;
 }
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:36,代码来源:scripts.php


示例5: test_checked_publish_with_no_update_and_no_new

 function test_checked_publish_with_no_update_and_no_new()
 {
     update_option('webpush_triggers', array());
     $admin = new WebPush_Admin();
     $post = new WP_Post((object) array('post_status' => 'publish'));
     $box = get_echo(array($admin, 'meta_box'), array($post));
     $this->assertNotContains('checked', $box);
 }
开发者ID:mozilla,项目名称:wp-web-push,代码行数:8,代码来源:test-admin-meta-box.php


示例6: test_the_taxonomies_term_template

 /**
  * @group 27238
  */
 function test_the_taxonomies_term_template()
 {
     $post_id = $this->factory->post->create();
     $output = get_echo('the_taxonomies', array(array('post' => $post_id, 'term_template' => '%2$s')));
     $this->assertEquals('Categories: Uncategorized.', $output);
     $output = get_echo('the_taxonomies', array(array('post' => $post_id, 'term_template' => '<span class="foo"><a href="%1$s">%2$s</a></span>')));
     $link = get_category_link(1);
     $this->assertEquals('Categories: <span class="foo"><a href="' . $link . '">Uncategorized</a></span>.', $output);
 }
开发者ID:Benrajalu,项目名称:philRaj,代码行数:12,代码来源:taxonomy.php


示例7: test_maybe_run_ajax_cache_should_return_javascript

 public function test_maybe_run_ajax_cache_should_return_javascript()
 {
     $GLOBALS['post'] = $this->factory()->post->create_and_get(array('post_title' => 'Hello World'));
     $_GET['message'] = 'foo';
     $url = admin_url('admin-ajax.php?action=oembed-cache&post=' . $GLOBALS['post']->ID, 'relative');
     $actual = get_echo(array($this->wp_embed, 'maybe_run_ajax_cache'));
     unset($GLOBALS['post']);
     unset($GLOBALS['message']);
     $this->assertContains($url, $actual);
 }
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:10,代码来源:WpEmbed.php


示例8: test_search_returns_results_for_pages

 /**
  * @ticket 27042
  */
 public function test_search_returns_results_for_pages()
 {
     include_once ABSPATH . 'wp-admin/includes/nav-menu.php';
     self::factory()->post->create_many(3, array('post_type' => 'page', 'post_content' => 'foo'));
     self::factory()->post->create(array('post_type' => 'page', 'post_content' => 'bar'));
     $request = array('type' => 'quick-search-posttype-page', 'q' => 'foo', 'response-format' => 'json');
     $output = get_echo('_wp_ajax_menu_quick_search', array($request));
     $this->assertNotEmpty($output);
     $results = explode("\n", trim($output));
     $this->assertCount(3, $results);
 }
开发者ID:ryelle,项目名称:WordPress,代码行数:14,代码来源:wpAjaxMenuQuickSearch.php


示例9: test_add_oembed_discovery_links_to_attachment

 function test_add_oembed_discovery_links_to_attachment()
 {
     $post_id = self::factory()->post->create();
     $file = DIR_TESTDATA . '/images/canola.jpg';
     $attachment_id = self::factory()->attachment->create_object($file, $post_id, array('post_mime_type' => 'image/jpeg'));
     $this->go_to(get_permalink($attachment_id));
     $this->assertQueryTrue('is_attachment', 'is_singular', 'is_single');
     $expected = '<link rel="alternate" type="application/json+oembed" href="' . esc_url(get_oembed_endpoint_url(get_permalink())) . '" />' . "\n";
     $expected .= '<link rel="alternate" type="text/xml+oembed" href="' . esc_url(get_oembed_endpoint_url(get_permalink(), 'xml')) . '" />' . "\n";
     $this->assertEquals($expected, get_echo('wp_oembed_add_discovery_links'));
 }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:11,代码来源:discovery.php


示例10: array

 /**
  * @ticket 32312
  */
 public function test_submit_button_and_submit_field_should_fall_back_on_defaults_when_filtered_defaults_do_not_contain_the_keys()
 {
     $p = self::factory()->post->create();
     $args = array('name_submit' => 'foo-name', 'id_submit' => 'foo-id', 'class_submit' => 'foo-class', 'label_submit' => 'foo-label');
     add_filter('comment_form_defaults', array($this, 'filter_comment_form_defaults'));
     $form = get_echo('comment_form', array($args, $p));
     remove_filter('comment_form_defaults', array($this, 'filter_comment_form_defaults'));
     $button = '<input name="foo-name" type="submit" id="foo-id" class="foo-class" value="foo-label" />';
     $hidden = get_comment_id_fields($p);
     $this->assertRegExp('|<p class="form\\-submit">\\s*' . $button . '\\s*' . $hidden . '\\s*|', $form);
 }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:14,代码来源:commentForm.php


示例11: testDatetimeTimestampFieldAssets

 function testDatetimeTimestampFieldAssets()
 {
     $field = new CMB_Datetime_Timestamp_Field('foo', 'Title', array());
     // Register CMB-Scripts as this is a dependency.
     wp_enqueue_script('cmb-scripts', trailingslashit(CMB_URL) . 'js/cmb.js', array('jquery'));
     $field->enqueue_scripts();
     $scripts_output = get_echo('wp_print_scripts');
     // Scripts
     $this->assertContains(CMB_URL . '/js/cmb.js', $scripts_output);
     $this->assertContains(CMB_URL . '/js/jquery.timePicker.min.js', $scripts_output);
     $this->assertContains(CMB_URL . '/js/field.datetime.js', $scripts_output);
 }
开发者ID:duncanjbrown,项目名称:Custom-Meta-Boxes,代码行数:12,代码来源:testDateField.php


示例12: test_filtered_emoji_png_cdn

 /**
  * @ticket 36525
  */
 public function test_filtered_emoji_png_cdn()
 {
     $png_cdn = 'https://s.w.org/images/core/emoji/2.2.1/72x72/';
     $svn_cdn = 'https://s.w.org/images/core/emoji/2.2.1/svg/';
     $filtered_png_cdn = $this->_filtered_emoji_png_cdn();
     add_filter('emoji_url', array($this, '_filtered_emoji_png_cdn'));
     $output = get_echo('_print_emoji_detection_script');
     $this->assertContains(wp_json_encode($filtered_png_cdn), $output);
     $this->assertNotContains(wp_json_encode($png_cdn), $output);
     $this->assertContains(wp_json_encode($svn_cdn), $output);
     remove_filter('emoji_url', array($this, '_filtered_emoji_png_cdn'));
 }
开发者ID:aaemnnosttv,项目名称:develop.git.wordpress.org,代码行数:15,代码来源:Emoji.php


示例13: test_search_returns_results_for_published_posts

 /**
  * Test that search only returns results for published posts.
  *
  * @ticket 33742
  */
 public function test_search_returns_results_for_published_posts()
 {
     require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
     // This will make sure that WP_Query sets is_admin to true.
     set_current_screen('nav-menu.php');
     self::factory()->post->create(array('post_type' => 'post', 'post_status' => 'publish', 'post_title' => 'Publish', 'post_content' => 'FOO'));
     self::factory()->post->create(array('post_type' => 'post', 'post_status' => 'draft', 'post_title' => 'Draft', 'post_content' => 'FOO'));
     self::factory()->post->create(array('post_type' => 'post', 'post_status' => 'pending', 'post_title' => 'Pending', 'post_content' => 'FOO'));
     self::factory()->post->create(array('post_type' => 'post', 'post_status' => 'future', 'post_title' => 'Future', 'post_content' => 'FOO', 'post_date' => gmdate('Y-m-d H:i:s', strtotime('+1 month'))));
     $request = array('type' => 'quick-search-posttype-post', 'q' => 'FOO');
     $output = get_echo('_wp_ajax_menu_quick_search', array($request));
     $this->assertNotEmpty($output);
     $results = explode("\n", trim($output));
     $this->assertCount(1, $results);
 }
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:20,代码来源:wpAjaxMenuQuickSearch.php


示例14: test_custom_submit_field

	public function test_custom_submit_field() {
		$p = $this->factory->post->create();

		$args = array(
			'name_submit' => 'foo-name',
			'id_submit' => 'foo-id',
			'class_submit' => 'foo-class',
			'label_submit' => 'foo-label',
			'submit_field' => '<p class="my-custom-submit-field">%1$s %2$s</p>'
		);
		$form = get_echo( 'comment_form', array( $args, $p ) );

		$button = '<input name="foo-name" type="submit" id="foo-id" class="foo-class" value="foo-label" />';
		$hidden = get_comment_id_fields( $p );
		$this->assertRegExp( '|<p class="my\-custom\-submit\-field">\s*' . $button . '\s*' . $hidden . '\s*|', $form );
	}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:16,代码来源:commentForm.php


示例15: test_rest_pre_serve_request_headers

 function test_rest_pre_serve_request_headers()
 {
     if (!function_exists('xdebug_get_headers')) {
         $this->markTestSkipped('xdebug is required for this test');
     }
     $post = $this->factory()->post->create_and_get(array('post_title' => 'Hello World'));
     $request = new WP_REST_Request('GET', '/oembed/1.0/embed');
     $request->set_param('url', get_permalink($post->ID));
     $request->set_param('format', 'xml');
     $server = new WP_REST_Server();
     $response = $server->dispatch($request);
     $output = get_echo('_oembed_rest_pre_serve_request', array(true, $response, $request, $server));
     $this->assertNotEmpty($output);
     $headers = xdebug_get_headers();
     $this->assertTrue(in_array('Content-Type: text/xml; charset=' . get_option('blog_charset'), $headers));
 }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:16,代码来源:headers.php


示例16: test_setup_postdata_loop

	/**
	 * @ticket 24330
	 *
	 * setup_postdata( $a_post ) followed by the_content() in a loop that does not update
	 * global $post should use the content of $a_post rather then the global post.
	 */
	function test_setup_postdata_loop() {
		$post_id = $this->factory->post->create( array( 'post_content' => 'global post' ) );
		$GLOBALS['wp_query']->post = $GLOBALS['post'] = get_post( $post_id );

		$ids = $this->factory->post->create_many(5);
		foreach ( $ids as $id ) {
			$page = get_post( $id );
			if ( $page ) {
				setup_postdata( $page );
				$content = get_echo( 'the_content', array() );
				$this->assertEquals( $post_id, $GLOBALS['post']->ID );
				$this->assertNotEquals( '<p>global post</p>', strip_ws( $content ) );
				wp_reset_postdata();
			}
		}
	}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:22,代码来源:query.php


示例17: test_should_respect_reverse_top_level_param

 /**
  * @ticket 35175
  */
 public function test_should_respect_reverse_top_level_param()
 {
     $p = self::factory()->post->create();
     $comments = array();
     $now = time();
     for ($i = 0; $i <= 5; $i++) {
         $comments[] = self::factory()->comment->create(array('comment_post_ID' => $p, 'comment_date_gmt' => date('Y-m-d H:i:s', $now - $i), 'comment_author' => 'Commenter ' . $i));
     }
     update_option('page_comments', true);
     update_option('comments_per_page', 2);
     $this->go_to(get_permalink($p));
     // comments_template() populates $wp_query->comments
     get_echo('comments_template');
     $found1 = wp_list_comments(array('reverse_top_level' => true, 'echo' => false));
     preg_match_all('|id="comment\\-([0-9]+)"|', $found1, $matches);
     $this->assertSame(array($comments[0], $comments[1]), array_map('intval', $matches[1]));
     $found2 = wp_list_comments(array('reverse_top_level' => false, 'echo' => false));
     preg_match_all('|id="comment\\-([0-9]+)"|', $found2, $matches);
     $this->assertSame(array($comments[1], $comments[0]), array_map('intval', $matches[1]));
 }
开发者ID:theukedge,项目名称:wordpress-develop,代码行数:23,代码来源:wpListComments.php


示例18: test_custom_pagination_should_allow_ones_own_unapproved_comments

 /**
  * @ticket 37048
  */
 public function test_custom_pagination_should_allow_ones_own_unapproved_comments()
 {
     $p = self::factory()->post->create();
     $u = self::factory()->user->create();
     $comments = array();
     $now = time();
     for ($i = 0; $i <= 5; $i++) {
         $comments[] = self::factory()->comment->create(array('comment_post_ID' => $p, 'comment_date_gmt' => date('Y-m-d H:i:s', $now - $i), 'comment_author' => 'Commenter ' . $i, 'user_id' => $u));
     }
     // Only 2 and 5 are approved.
     wp_set_comment_status($comments[0], '0');
     wp_set_comment_status($comments[1], '0');
     wp_set_comment_status($comments[3], '0');
     wp_set_comment_status($comments[4], '0');
     update_option('page_comments', true);
     update_option('comments_per_page', 2);
     wp_set_current_user($u);
     $this->go_to(get_permalink($p));
     // comments_template() populates $wp_query->comments
     get_echo('comments_template');
     $found = wp_list_comments(array('echo' => false, 'per_page' => 1, 'page' => 2));
     preg_match_all('|id="comment\\-([0-9]+)"|', $found, $matches);
     $this->assertSame(array($comments[4]), array_map('intval', $matches[1]));
 }
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:27,代码来源:wpListComments.php


示例19: test_generate_manifest_link

 function test_generate_manifest_link()
 {
     $this->assertEquals('<link rel="manifest" href="http://example.org/wp-content/uploads/wpservefile_files/manifest.json">', get_echo(array(Mozilla\WebAppManifestGenerator::getInstance(), 'add_manifest')));
 }
开发者ID:mozilla,项目名称:wp-web-push,代码行数:4,代码来源:test-manifest.php


示例20: test_gallery_attributes

    function test_gallery_attributes()
    {
        // make sure the gallery shortcode attributes are parsed correctly
        $id = 575;
        $post = get_post($id);
        $this->assertNotNull($post, "get_post({$id}) could not find the post.");
        $post->post_content = '[gallery columns="1" size="medium"]';
        wp_update_post($post);
        // permalink page
        $this->go_to('/2008/04/01/simple-gallery-test/');
        the_post();
        // filtered output
        $out = get_echo('the_content');
        $expected = <<<EOF
\t\t<style type='text/css'>
\t\t\t.gallery {
\t\t\t\tmargin: auto;
\t\t\t}
\t\t\t.gallery-item {
\t\t\t\tfloat: left;
\t\t\t\tmargin-top: 10px;
\t\t\t\ttext-align: center;
\t\t\t\twidth: 100%;\t\t\t}
\t\t\t.gallery img {
\t\t\t\tborder: 2px solid #cfcfcf;
\t\t\t}
\t\t\t.gallery-caption {
\t\t\t\tmargin-left: 0;
\t\t\t}
\t\t</style>
\t\t<!-- see gallery_shortcode() in wp-includes/media.php -->
\t\t<div class='gallery'><dl class='gallery-item'>
\t\t\t<dt class='gallery-icon'>
\t\t\t\t<a href='http://example.com/?attachment_id=565' title='dsc20040724_152504_53'><img src="http://example.com/wp-content/uploads/2008/04/dsc20040724_152504_537.jpg" class="attachment-medium" alt="" /></a>
\t\t\t</dt></dl><br style="clear: both" /><dl class='gallery-item'>
\t\t\t<dt class='gallery-icon'>
\t\t\t\t<a href='http://example.com/?attachment_id=566' title='canola'><img src="http://example.com/wp-content/uploads/2008/04/canola3.jpg" class="attachment-medium" alt="" /></a>
\t\t\t</dt></dl><br style="clear: both" /><dl class='gallery-item'>
\t\t\t<dt class='gallery-icon'>
\t\t\t\t<a href='http://example.com/?attachment_id=567' title='dsc20050315_145007_13'><img src="http://example.com/wp-content/uploads/2008/04/dsc20050315_145007_134.jpg" class="attachment-medium" alt="" /></a>
\t\t\t</dt></dl><br style="clear: both" /><dl class='gallery-item'>
\t\t\t<dt class='gallery-icon'>
\t\t\t\t<a href='http://example.com/?attachment_id=568' title='dsc20050604_133440_34'><img src="http://example.com/wp-content/uploads/2008/04/dsc20050604_133440_343.jpg" class="attachment-medium" alt="" /></a>
\t\t\t</dt></dl><br style="clear: both" /><dl class='gallery-item'>
\t\t\t<dt class='gallery-icon'>
\t\t\t\t<a href='http://example.com/?attachment_id=569' title='dsc20050831_165238_33'><img src="http://example.com/wp-content/uploads/2008/04/dsc20050831_165238_333.jpg" class="attachment-medium" alt="" /></a>
\t\t\t</dt></dl><br style="clear: both" /><dl class='gallery-item'>
\t\t\t<dt class='gallery-icon'>
\t\t\t\t<a href='http://example.com/?attachment_id=570' title='dsc20050901_105100_21'><img src="http://example.com/wp-content/uploads/2008/04/dsc20050901_105100_213.jpg" class="attachment-medium" alt="" /></a>
\t\t\t</dt></dl><br style="clear: both" /><dl class='gallery-item'>
\t\t\t<dt class='gallery-icon'>
\t\t\t\t<a href='http://example.com/?attachment_id=571' title='dsc20050813_115856_5'><img src="http://example.com/wp-content/uploads/2008/04/dsc20050813_115856_54.jpg" class="attachment-medium" alt="" /></a>
\t\t\t</dt></dl><br style="clear: both" /><dl class='gallery-item'>
\t\t\t<dt class='gallery-icon'>
\t\t\t\t<a href='http://example.com/?attachment_id=572' title='dsc20050720_123726_27'><img src="http://example.com/wp-content/uploads/2008/04/dsc20050720_123726_274.jpg" class="attachment-medium" alt="" /></a>
\t\t\t</dt></dl><br style="clear: both" /><dl class='gallery-item'>
\t\t\t<dt class='gallery-icon'>
\t\t\t\t<a href='http://example.com/?attachment_id=573' title='Title: Seedlings'><img src="http://example.com/wp-content/uploads/2008/04/dsc20050727_091048_224.jpg" class="attachment-medium" alt="" /></a>
\t\t\t</dt></dl><br style="clear: both" /><dl class='gallery-item'>
\t\t\t<dt class='gallery-icon'>
\t\t\t\t<a href='http://example.com/?attachment_id=574' title='dsc20050726_083116_18'><img src="http://example.com/wp-content/uploads/2008/04/dsc20050726_083116_184.jpg" class="attachment-medium" alt="" /></a>
\t\t\t</dt></dl><br style="clear: both" />
\t\t\t<br style='clear: both;' />
\t\t</div>

EOF;
        $this->assertEquals(strip_ws($expected), strip_ws($out));
    }
开发者ID:boonebgorges,项目名称:wp,代码行数:68,代码来源:gallery.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP get_edit_access函数代码示例发布时间:2022-05-15
下一篇:
PHP get_dyna_libs函数代码示例发布时间: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