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


PHP get_bookmark函数代码示例

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


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

示例1: get_wrapped_object

 /**
  * Retrieve the bookmark associated with this container. 
  *
  * @access protected
  *
  * @param bool $ensure_consistency Set this to true to ignore the cached $wrapped_object value and retrieve an up-to-date copy of the wrapped object from the DB (or WP's internal cache).
  * @return object Bookmark data.
  */
 function get_wrapped_object($ensure_consistency = false)
 {
     if ($ensure_consistency || is_null($this->wrapped_object)) {
         $this->wrapped_object = get_bookmark($this->container_id);
     }
     return $this->wrapped_object;
 }
开发者ID:gumbysgoo,项目名称:bestilblomster,代码行数:15,代码来源:blogroll.php

示例2: faf_filters_dbug

    function faf_filters_dbug()
    {
        $post = array('post_title' => ' Valve begint besloten bètatest voor Linux-versie Linuxversie Steam in Linux', 'post_content' => 'ZOETERMEER – ZOETERMEER – <br />Valve is begonnen met een besloten bètatest voor de Linux-versie van zijn gamingplatform Steam. 
		<span id="GUROGOROR"> <img src="http://localhost/rss_images/basszje_snowboard.jpg?w=10&h=100" /></span><b>MOTHERFUCKERS</b><i>Dacht ik ook</i> 
		<img src="http://unit-test.weblogmechanic.com/blergh.jpg">
		 <img alt="alt-text" src="http://www.server.tld/2013/04/picture.jpg?w=300&h=98" width="300" height="98" />
		<blockquote>Deelnemers</blockquote> kunnen kiezen uit 26 verschillende games, waaronder Team Fortress 2. Valve is van plan de komende tijd meer mensen toe  te laten tot de bètatest.	 <img src="http://localhost/rss_images/fotoxx_exampl.jpg" width="450" height="251" />
		<a href=\'http://tweakers.net/nieuws/85391/blodhoung\'>Meer onzin</a>- <img src="http://localhost/rss_images/balzaka.jpg">
		
		<p>Alumni of the old Kyiv-Mohyla Academy have played an important role in Ukrainian professional life. Many hetmans of Zaporozhian Cossacks, political leaders of Ukraine in the 17th and 18th centuries, were educated here. These include Ivan Mazepa, Pylyp Orlyk, Pavlo Polubotok, Ivan Skoropadsky and Ivan Samoylovych. The Grand Chancellor of Russia Alexander Bezborodko was of Ukrainian origin and an alumnus. The Kyiv-Mohyla Academy was a religious school of note in the Orthodox world and archbishops of the Russian Empire such as Stephen Yavorsky and Feofan Prokopovich as well as the metropolitan bishop of Rostov Dimitry of Rostov were all alumni.</p>
		', 'post_excerpt' => '<b>Valve</b> is begonnen <em>met</em> een besloten b&egrave;tatest voor de Linux-versie van zijn gamingplatform Steam. 
		<span> <img src="http://localhost/rss_images/basszje_snowboard.jpg"></span><b>MOTHERFUCKERS</b><i>Dacht ik ook</i>
		<blockquote>Deelnemers</blockquote> kunnen kiezen uit 26 verschillende games, waaronder Team Fortress 2. Valve is van plan de komende tijd meer mensen toe  te laten tot de b&egrave;tatest.<img src="http://localhost/rss_images/fotoxx_exampl.jpg" width="450" height="251"><a href="http://www.rssmix.com/blodhoung">Meer onzin</a> - <img src="http://localhost/rss_images/balzaka.jpg">', 'post_date_gmt' => '2012-11-07 07:42:00', 'post_date' => '2012-11-07 09:42:00', 'post_modified_gmt' => '2012-11-07 07:42:00', 'post_modified' => '2012-11-07 09:42:00', 'post_status' => 'publish', 'comment_status' => 'open', 'ping_status' => 'open', 'guid' => 'tag:localhost://51f739b51776315701d282f6193ab561', 'meta' => array('enclosure' => array('http://unit-test.weblogmechanic.com/PEEN4936_-_Version_2.jpg 
 		0 image/jpeg'), 'syndication_source' => 'RSSMix.com Mix ID 3587188', 'syndication_source_uri' => 'http://www.rssmix.com/', 'syndication_source_id' => 'http://localhost/algemeen.rss', 'syndication_feed' => 'http://localhost/algemeen.rss', 'syndication_feed_id' => 23, 'syndication_permalink' => 'http://tweakers.net/nieuws/85391/valve-begint-besloten-betatest-voor-linux-versie-steam.html', 'syndication_item_hash' => '5372b0a8280ff40a59b0739714f25015'), 'post_type' => 'post', 'post_author' => 14, 'tax_input' => array('post_tag' => array(), 'post_format' => array(), 'category' => array(0 => 98, 1 => 198)));
        // init faf
        $doRun = true;
        if ($doRun) {
            $faf = new feedwordpressAdvancedFilters();
            $link = "http://localhost/algemeen.rss";
            $book = get_bookmark(20);
            $Slink = new SyndicatedLink($book);
            $fakeP = (object) "";
            $fakeP->link = $Slink;
            // run decide
            $post = $faf->faf_decide_filter($post, $fakeP);
            echo "<pre>";
            print_r($post);
            echo "</pre>";
        }
    }
开发者ID:berniecultess,项目名称:infirev,代码行数:30,代码来源:dbug.php

示例3: add_strings_package

 /**
  * @param int $link_id
  */
 private function add_strings_package($link_id)
 {
     $link = get_bookmark($link_id);
     $package = $this->helper->get_package($link);
     $name_string_name = $this->helper->get_link_string_name('name', $link);
     $description_string_name = $this->helper->get_link_string_name('description', $link);
     do_action('wpml_register_string', $link->link_name, $name_string_name, $package, 'Link title', 'LINE');
     do_action('wpml_register_string', $link->link_description, $description_string_name, $package, 'Link description', 'AREA');
 }
开发者ID:OnTheGoSystems,项目名称:wpml-link-manager,代码行数:12,代码来源:class-wpml-link-manager.php

示例4: get_value

 /**
  * @see CPAC_Column::get_value()
  * @since 2.0
  */
 function get_value($id)
 {
     $bookmark = get_bookmark($id);
     $value = $bookmark->link_owner;
     // add user link
     $userdata = get_userdata($bookmark->link_owner);
     if (!empty($userdata->data)) {
         $value = $userdata->data->user_nicename;
     }
     return $value;
 }
开发者ID:OneTimeUser,项目名称:retailwire,代码行数:15,代码来源:owner.php

示例5: test_deleted_link_action

 public function test_deleted_link_action()
 {
     $this->instantiate_link_manager('link.php');
     $args = array("link_url" => 'http://test.com', "link_name" => 'The link name', "link_description" => 'The link description');
     $link_id = wp_insert_link($args);
     $link = get_bookmark($link_id);
     $package = $this->lm_helper->get_package($link, 'link');
     $this->assertTrue($this->package_exist_in_DB($package));
     $this->lm->deleted_link_action($link_id);
     $this->assertFalse($this->package_exist_in_DB($package));
 }
开发者ID:OnTheGoSystems,项目名称:wpml-link-manager,代码行数:11,代码来源:test-wpml-link-manager.php

示例6: SyndicatedLink

 function SyndicatedLink($link)
 {
     global $wpdb;
     if (is_object($link)) {
         $this->link = $link;
         $this->id = $link->link_id;
     } else {
         $this->id = $link;
         $this->link = get_bookmark($link);
     }
     if (strlen($this->link->link_rss) > 0) {
         $this->get_settings_from_notes();
     }
     add_filter('feedwordpress_update_complete', array($this, 'process_retirements'), 1000, 1);
 }
开发者ID:kosir,项目名称:thatcamp-org,代码行数:15,代码来源:syndicatedlink.class.php

示例7: get_bookmark_field

/**
 * Retrieve single bookmark data item or field.
 *
 * @since 2.3.0
 *
 * @param string $field The name of the data field to return
 * @param int $bookmark The bookmark ID to get field
 * @param string $context Optional. The context of how the field will be used.
 * @return string|WP_Error
 */
function get_bookmark_field($field, $bookmark, $context = 'display')
{
    $bookmark = (int) $bookmark;
    $bookmark = get_bookmark($bookmark);
    if (is_wp_error($bookmark)) {
        return $bookmark;
    }
    if (!is_object($bookmark)) {
        return '';
    }
    if (!isset($bookmark->{$field})) {
        return '';
    }
    return sanitize_bookmark_field($field, $bookmark->{$field}, $bookmark->link_id, $context);
}
开发者ID:AndyMarkle,项目名称:rocket,代码行数:25,代码来源:bookmark.php

示例8: get_buckets

/**
 * This gets buckets of content and has some defaults which allow for the
 * most generic buckets to be laid out for display. Carousels are also
 * buckets.
 */
function get_buckets($bucket_type = 'Bucket', $exclude_category = 'Case Studies, CC Store', $orderby = 'rating', $debug = false)
{
    $buckets = array();
    $bookmarks = get_bookmarks(array('orderby' => $orderby, 'category_name' => $bucket_type));
    $excluded_categories = explode(', ', $exclude_category);
    if (empty($excluded_categories)) {
        $excluded_categories[] = $exclude_category;
    }
    foreach ($bookmarks as $b) {
        $do_not_save = false;
        $book = get_bookmark($b->link_id);
        foreach ($book->link_category as $term_id) {
            $link_terms = get_term_by('id', $term_id, 'link_category');
            if (in_array($link_terms->name, $excluded_categories)) {
                $do_not_save = true;
            }
            $book->link_terms[] = $link_terms;
        }
        if (!$do_not_save) {
            $buckets[] = $book;
        }
    }
    return $buckets;
}
开发者ID:pietsch,项目名称:search,代码行数:29,代码来源:home-gestalt.php

示例9: get_link

/**
 * Retrieve bookmark data based on ID.
 *
 * @since 2.0
 * @deprecated Use get_bookmark()
 * @see get_bookmark()
 *
 * @param int $bookmark_id ID of link
 * @param string $output Either OBJECT, ARRAY_N, or ARRAY_A
 * @return object|array
 */
function get_link($bookmark_id, $output = OBJECT, $filter = 'raw')
{
    return get_bookmark($bookmark_id, $output, $filter);
}
开发者ID:nurpax,项目名称:saastafi,代码行数:15,代码来源:bookmark.php

示例10: bookmark_link

 function bookmark_link($atts)
 {
     //extract page name from the shortcode attributes
     extract(shortcode_atts(array('id' => '0', 'text' => ''), $atts));
     //convert the page name to a page ID
     $bookmark = get_bookmark($id);
     if (isset($text)) {
         $ltext = $text;
     } else {
         $ltext = $bookmark->link_name;
     }
     $pagelink = "<a href=\"" . $bookmark->link_url . "\" target=\"" . $bookmark->link_target . "\">" . $ltext . "</a>";
     return $pagelink;
 }
开发者ID:taeche,项目名称:SoDoEx,代码行数:14,代码来源:library.pagelines.php

示例11: get_bookmark

 public function get_bookmark($bookmark_id)
 {
     $bookmark = get_bookmark($bookmark_id);
     if (!empty($bookmark->link_category)) {
         foreach ($bookmark->link_category as &$link_category) {
             $link_category = get_term($link_category, 'link_category');
         }
     }
     return $bookmark;
 }
开发者ID:niko-lgdcom,项目名称:wp-install,代码行数:10,代码来源:batch.class.php

示例12: wp_delete_term

     $r = wp_delete_term($id, 'link_category', array('default' => $default));
     if (!$r) {
         die('0');
     }
     if (is_wp_error($r)) {
         $x = new WP_AJAX_Response(array('what' => 'link-cat', 'id' => $id, 'data' => $r));
         $x->send();
     }
     die('1');
     break;
 case 'delete-link':
     check_ajax_referer("delete-bookmark_{$id}");
     if (!current_user_can('manage_links')) {
         die('-1');
     }
     $link = get_bookmark($id);
     if (!$link || is_wp_error($link)) {
         die('1');
     }
     if (wp_delete_link($id)) {
         die('1');
     } else {
         die('0');
     }
     break;
 case 'delete-meta':
     check_ajax_referer("delete-meta_{$id}");
     if (!($meta = get_post_meta_by_id($id))) {
         die('1');
     }
     if (!current_user_can('edit_post', $meta->post_id)) {
开发者ID:nagyist,项目名称:laura-wordpress,代码行数:31,代码来源:admin-ajax.php

示例13: wp_update_link

/**
 * {@internal Missing Short Description}}
 *
 * @since unknown
 *
 * @param unknown_type $linkdata
 * @return unknown
 */
function wp_update_link( $linkdata ) {
	$link_id = (int) $linkdata['link_id'];

	$link = get_bookmark( $link_id, ARRAY_A );

	// Escape data pulled from DB.
	$link = add_magic_quotes( $link );

	// Passed link category list overwrites existing category list if not empty.
	if ( isset( $linkdata['link_category'] ) && is_array( $linkdata['link_category'] )
			 && 0 != count( $linkdata['link_category'] ) )
		$link_cats = $linkdata['link_category'];
	else
		$link_cats = $link['link_category'];

	// Merge old and new fields with new fields overwriting old ones.
	$linkdata = array_merge( $link, $linkdata );
	$linkdata['link_category'] = $link_cats;

	return wp_insert_link( $linkdata );
}
开发者ID:realfluid,项目名称:umbaugh,代码行数:29,代码来源:bookmark.php

示例14: header

                     header('Location: ' . $rurl);
                 } else {
                     if ($rtpvalidated == 79 and $siteprefix == 'wp_3_') {
                         $rurl = 'http://www.eschoolnews.com' . $_SERVER["REQUEST_URI"];
                         header('Location: ' . $rurl);
                     } else {
                         if ($rtpvalidated == 80 and $siteprefix == 'wp_3_') {
                             $rurl = 'http://www.eschoolnews.com' . $_SERVER["REQUEST_URI"];
                             header('Location: ' . $rurl);
                         }
                     }
                 }
             }
         }
     }
     $bookmark = get_bookmark($rtpvalidated);
     $url = $bookmark->link_url;
     $pagetitle = $bookmark->link_name;
     $redirectto = 1;
 } else {
     if (isset($_GET['trk']) && is_numeric($_GET['trk'])) {
         echo '<!-- no comments -->';
         $onlytrack = 1;
         $rtpvalidated = $_GET['trk'];
         $pagertl = $rtpvalidated;
         $redirectto = 0;
         $pagetitle = 'DL ' . get_the_title($rtpvalidated);
         $ercid = intval($_GET['ast']);
         $pagecat = intval($_GET['astc']);
         if (isset($_GET['ps']) or isset($_GET['amp;ps'])) {
             if (isset($_GET['ps'])) {
开发者ID:esm-erika,项目名称:eschoolnews,代码行数:31,代码来源:rtp4.php

示例15: get_value

 /**
  * @see CPAC_Column::get_value()
  * @since 2.0
  */
 function get_value($id)
 {
     $bookmark = get_bookmark($id);
     return $this->get_shorten_url($bookmark->link_rss);
 }
开发者ID:xeiter,项目名称:timeplannr,代码行数:9,代码来源:rss.php


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