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

PHP user_can_edit_post函数代码示例

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

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



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

示例1: user_can_edit_post_comments

/**
 * Whether user can delete a post.
 *
 * @since 1.5
 * @deprecated 2.0
 * @deprecated Use current_user_can()
 * @see current_user_can()
 *
 * @param int $user_id
 * @param int $post_id
 * @param int $blog_id Not Used
 * @return bool returns true if $user_id can edit $post_id's comments
 */
function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1)
{
    _deprecated_function(__FUNCTION__, '2.0', 'current_user_can()');
    // right now if one can edit a post, one can edit comments made on it
    return user_can_edit_post($user_id, $post_id, $blog_id);
}
开发者ID:rkglug,项目名称:WordPress,代码行数:19,代码来源:deprecated.php


示例2: mt_publishPost

	function mt_publishPost($args) {

		$this->escape($args);

	  $post_ID     = $args[0];
	  $user_login  = $args[1];
	  $user_pass   = $args[2];

	  if (!$this->login_pass_ok($user_login, $user_pass)) {
	    return $this->error;
	  }

	  $user_data = get_userdatabylogin($user_login);
	  if (!user_can_edit_post($user_data->ID, $post_ID)) {
	    return new IXR_Error(401, 'Sorry, you can not edit this post.');
	  }

	  $postdata = wp_get_single_post($post_ID,ARRAY_A);

	  $postdata['post_status'] = 'publish';

	  // retain old cats
	  $cats = wp_get_post_cats('',$post_ID);
	  $postdata['post_category'] = $cats;
		$this->escape($postdata);

	  $result = wp_update_post($postdata);

	  return $result;
	}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:30,代码来源:xmlrpc.php


示例3: user_can_edit_post_comments

function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1)
{
    // right now if one can edit a post, one can edit comments made on it
    return user_can_edit_post($user_id, $post_id, $blog_id);
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:5,代码来源:deprecated.php


示例4: get_records_sql_array

$posts = get_records_sql_array('SELECT p.id, p.parent, p.path, p.poster, p.subject, p.body, ' . db_format_tsfield('p.ctime', 'ctime') . ', p.deleted
    FROM {interaction_forum_post} p
    WHERE p.topic = ?
    ORDER BY ' . $order, array($topicid), $offset, $limit);
// This is only needed for the 'no_indent' option
$lastpostid = null;
if ($indentmode == 'no_indent') {
    $lastpost = get_record_select('interaction_forum_post', 'topic = ? ORDER by ctime DESC, id DESC LIMIT 1', array($topicid));
    $lastpostid = $lastpost->id;
}
// Get extra info of posts
$prevdeletedid = false;
foreach ($posts as $postid => $post) {
    // Get the number of posts
    $post->postcount = get_postcount($post->poster);
    $post->canedit = $post->parent && ($moderator || user_can_edit_post($post->poster, $post->ctime)) && $ineditwindow;
    $post->ctime = relative_date(get_string('strftimerecentfullrelative', 'interaction.forum'), get_string('strftimerecentfull'), $post->ctime);
    // Get post edit records
    $post->edit = get_postedits($post->id);
    // Get moderator info
    $post->moderator = is_moderator($post->poster) ? $post->poster : null;
    // Update the subject of posts
    $post->subject = !empty($post->subject) ? $post->subject : get_string('re', 'interaction.forum', get_ancestorpostsubject($post->id));
    // If this is the own post
    $post->ownpost = $USER->get('id') == $post->poster ? true : false;
    // Reported reason data
    $post->reports = get_records_select_array('objectionable', 'objecttype = ? AND objectid = ? AND resolvedby IS NULL AND resolvedtime IS NULL', array('forum', $post->id));
    // Consolidate deleted message posts by the same author into one "X posts by Spammer Joe were deleted"
    if ($post->deleted) {
        if ($prevdeletedid && $posts[$prevdeletedid]->poster == $post->poster) {
            $posts[$prevdeletedid]->deletedcount++;
开发者ID:sarahjcotton,项目名称:mahara,代码行数:31,代码来源:topic.php


示例5: user_can_access_forum

$membership = user_can_access_forum((int) $parent->forum);
$moderator = (bool) ($membership & INTERACTION_FORUM_MOD);
if (!isset($postid)) {
    // post reply
    if (!$membership) {
        throw new AccessDeniedException(get_string('cantaddposttoforum', 'interaction.forum'));
    }
    if (!$moderator && $parent->topicclosed) {
        throw new AccessDeniedException(get_string('cantaddposttotopic', 'interaction.forum'));
    }
    $action = get_string('postreply', 'interaction.forum');
    define('TITLE', $parent->topicsubject . ' - ' . $action);
} else {
    // edit post
    // no record for edits to own posts with 30 minutes
    if (user_can_edit_post($post->poster, $post->ctime)) {
        $post->editrecord = false;
    } else {
        if ($moderator) {
            $post->editrecord = true;
        } else {
            throw new AccessDeniedException(get_string('canteditpost', 'interaction.forum'));
        }
    }
    $action = get_string('editpost', 'interaction.forum');
    define('TITLE', $parent->topicsubject . ' - ' . $action);
}
$parent->ctime = relative_date(get_string('strftimerecentfullrelative', 'interaction.forum'), get_string('strftimerecentfull'), $parent->ctime);
// Javascript to hide the subject box if it has nothing in it, with a link you
// click to expand it.
$clicksetsubject = json_encode(get_string('clicksetsubject', 'interaction.forum'));
开发者ID:richardmansfield,项目名称:richardms-mahara,代码行数:31,代码来源:editpost.php


示例6: apply_filters

	<div class="storycontent">
	<?php 
        $content = apply_filters('the_content', $post->post_content);
        echo $content;
        ?>
	</div>
	</div>
	<?php 
        break;
    case 'editpost':
        // die(var_dump('<pre>', $_POST));
        if (!isset($blog_ID)) {
            $blog_ID = 1;
        }
        $post_ID = (int) $_POST['post_ID'];
        if (!user_can_edit_post($user_ID, $post_ID, $blog_ID)) {
            die(__('You are not allowed to edit this post.'));
        }
        $post_categories = $_POST['post_category'];
        if (!$post_categories) {
            $post_categories[] = 1;
        }
        $content = apply_filters('content_save_pre', $_POST['content']);
        $excerpt = apply_filters('excerpt_save_pre', $_POST['excerpt']);
        $post_title = $_POST['post_title'];
        $prev_status = $_POST['prev_status'];
        $post_status = $_POST['post_status'];
        $menu_order = (int) $_POST['menu_order'];
        if (!empty($_POST['post_author_override'])) {
            $post_author = (int) $_POST['post_author_override'];
        } else {
开发者ID:BackupTheBerlios,项目名称:steampress-svn,代码行数:31,代码来源:post.php


示例7: define

}
if (!isset($topicid)) {
    // new topic
    define('TITLE', $forum->title . ' - ' . get_string('addtopic', 'interaction.forum'));
} else {
    // edit topic
    define('TITLE', $forum->title . ' - ' . get_string('edittopic', 'interaction.forum'));
    // no record for edits to own posts with 30 minutes
    if (user_can_edit_post($topic->poster, $topic->ctime)) {
        $topic->editrecord = false;
        $timeleft = (int) get_config_plugin('interaction', 'forum', 'postdelay') - round((time() - $topic->ctime) / 60);
    } else {
        if ($moderator) {
            $topic->editrecord = true;
        } else {
            if (user_can_edit_post($topic->poster, $topic->ctime, $USER->get('id'), false)) {
                $SESSION->add_error_msg(get_string('postaftertimeout', 'interaction.forum', get_config_plugin('interaction', 'forum', 'postdelay')));
                redirect('/interaction/forum/topic.php?id=' . $topicid);
            } else {
                throw new AccessDeniedException(get_string('cantedittopic', 'interaction.forum'));
            }
        }
    }
}
$editform = array('name' => isset($topic) ? 'edittopic' : 'addtopic', 'method' => 'post', 'autofocus' => isset($topic) ? 'body' : 'subject', 'elements' => array('subject' => array('type' => 'text', 'title' => get_string('Subject', 'interaction.forum'), 'defaultvalue' => isset($topic) ? $topic->subject : null, 'rules' => array('required' => true, 'maxlength' => 255)), 'body' => array('type' => 'wysiwyg', 'title' => get_string('Body', 'interaction.forum'), 'rows' => 18, 'cols' => 70, 'defaultvalue' => isset($topic) ? $topic->body : null, 'rules' => array('required' => true, 'maxlength' => 65536)), 'sticky' => array('type' => 'switchbox', 'title' => get_string('Sticky', 'interaction.forum'), 'description' => get_string('stickydescription', 'interaction.forum'), 'defaultvalue' => isset($topic) && $topic->sticky == 1 ? 'checked' : null), 'closed' => array('type' => 'switchbox', 'title' => get_string('Closed', 'interaction.forum'), 'description' => get_string('closeddescription', 'interaction.forum'), 'defaultvalue' => isset($topic) ? $topic->closed : !empty($forumconfig['closetopics']->value)), 'sendnow' => array('type' => 'switchbox', 'title' => get_string('sendnow', 'interaction.forum'), 'description' => get_string('sendnowdescription', 'interaction.forum', get_config_plugin('interaction', 'forum', 'postdelay')), 'defaultvalue' => false), 'submit' => array('type' => 'submitcancel', 'value' => array(isset($topic) ? get_string('save') : get_string('Post', 'interaction.forum'), get_string('cancel')), 'goto' => get_config('wwwroot') . 'interaction/forum/' . (isset($topic) && $returnto != 'view' ? 'topic.php?id=' . $topicid : 'view.php?id=' . $forumid)), 'post' => array('type' => 'hidden', 'value' => isset($topic) ? $topic->postid : false), 'editrecord' => array('type' => 'hidden', 'value' => isset($topic) ? $topic->editrecord : false)));
if (!$moderator) {
    if (!group_sendnow($forum->groupid) && !$admintutor) {
        unset($editform['elements']['sendnow']);
    }
    unset($editform['elements']['sticky']);
    unset($editform['elements']['closed']);
开发者ID:vohung96,项目名称:mahara,代码行数:31,代码来源:edittopic.php


示例8: JOIN

    LEFT JOIN {interaction_forum_topic} t3 ON t3.id = p3.topic
    LEFT JOIN (
        SELECT m.forum, m.user
        FROM {interaction_forum_moderator} m
        INNER JOIN {usr} u ON (m.user = u.id AND u.deleted = 0)
    ) m2 ON (m2.forum = t3.forum AND m2.user = e.user)
    WHERE p1.topic = ?
    GROUP BY 1, 2, 3, 4, 5, p1.ctime, 7, 8, 10, 11, 12, e.ctime
    ORDER BY p1.ctime, p1.id, e.ctime', array($topic->groupid, $topicid));
// $posts has an object for every edit to a post
// this combines all the edits into a single object for each post
// also formats the edits a bit
$count = count($posts);
for ($i = 0; $i < $count; $i++) {
    $posts[$i]->postcount = get_string('postsvariable', 'interaction.forum', $posts[$i]->postcount);
    $posts[$i]->canedit = $posts[$i]->parent && ($moderator || user_can_edit_post($posts[$i]->poster, $posts[$i]->ctime));
    $posts[$i]->ctime = relative_date(get_string('strftimerecentfullrelative', 'interaction.forum'), get_string('strftimerecentfull'), $posts[$i]->ctime);
    $postedits = array();
    if ($posts[$i]->editor) {
        $postedits[] = array('editor' => $posts[$i]->editor, 'edittime' => relative_date(get_string('strftimerecentfullrelative', 'interaction.forum'), get_string('strftimerecentfull'), $posts[$i]->edittime), 'moderator' => $posts[$i]->editormoderator);
    }
    $temp = $i;
    while (isset($posts[$i + 1]) && $posts[$i + 1]->id == $posts[$temp]->id) {
        // while the next object is the same post
        $i++;
        $postedits[] = array('editor' => $posts[$i]->editor, 'edittime' => relative_date(get_string('strftimerecentfullrelative', 'interaction.forum'), get_string('strftimerecentfull'), $posts[$i]->edittime), 'moderator' => $posts[$i]->editormoderator);
        unset($posts[$i]);
    }
    $posts[$temp]->edit = $postedits;
}
// builds the first post (with index 0) which has as children all the posts in the topic
开发者ID:Br3nda,项目名称:mahara,代码行数:31,代码来源:topic.php


示例9: comment_text

            comment_text();
            ?>

        <p><?php 
            _e('Posted');
            echo ' ';
            comment_date('M j, g:i A');
            if (user_can_edit_post_comments($user_ID, $comment->comment_post_ID)) {
                echo " | <a href=\"post.php?action=editcomment&amp;comment=" . $comment->comment_ID . "\">" . __('Edit Comment') . "</a>";
            }
            if (user_can_delete_post_comments($user_ID, $comment->comment_post_ID)) {
                echo " | <a href=\"post.php?action=deletecomment&amp;p=" . $comment->comment_post_ID . "&amp;comment=" . $comment->comment_ID . "\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \\'%s\\'\\n  \\'Cancel\\' to stop, \\'OK\\' to delete."), $comment->comment_author) . "')\">" . __('Delete Comment') . "</a> &#8212; ";
            }
            // end if any comments to show
            // Get post title
            if (user_can_edit_post($user_ID, $comment->comment_post_ID)) {
                $post_title = $wpdb->get_var("SELECT post_title FROM {$wpdb->posts} WHERE ID = {$comment->comment_post_ID}");
                $post_title = '' == $post_title ? "# {$comment->comment_post_ID}" : $post_title;
                ?>
 <a href="post.php?action=edit&amp;post=<?php 
                echo $comment->comment_post_ID;
                ?>
"><?php 
                printf(__('Edit Post &#8220;%s&#8221;'), stripslashes($post_title));
                ?>
</a>
				<?php 
            }
            ?>
			 | <a href="<?php 
            echo get_permalink($comment->comment_post_ID);
开发者ID:BackupTheBerlios,项目名称:steampress-svn,代码行数:31,代码来源:edit-comments.php


示例10: NotFoundException

    throw new NotFoundException(get_string('cantfindforum', 'interaction.forum', $forumid));
}
define('GROUP', $forum->groupid);
$membership = user_can_access_forum((int) $forumid);
$moderator = (bool) ($membership & INTERACTION_FORUM_MOD);
if (!$membership) {
    throw new AccessDeniedException(get_string('cantaddtopic', 'interaction.forum'));
}
if (!isset($topicid)) {
    // new topic
    define('TITLE', $forum->title . ' - ' . get_string('addtopic', 'interaction.forum'));
} else {
    // edit topic
    define('TITLE', $forum->title . ' - ' . get_string('edittopic', 'interaction.forum'));
    // no record for edits to own posts with 30 minutes
    if (user_can_edit_post($topic->poster, $topic->ctime)) {
        $topic->editrecord = false;
    } else {
        if ($moderator) {
            $topic->editrecord = true;
        } else {
            throw new AccessDeniedException(get_string('cantedittopic', 'interaction.forum'));
        }
    }
}
$editform = array('name' => isset($topic) ? 'edittopic' : 'addtopic', 'method' => 'post', 'autofocus' => false, 'elements' => array('subject' => array('type' => 'text', 'title' => get_string('Subject', 'interaction.forum'), 'defaultvalue' => isset($topic) ? $topic->subject : null, 'rules' => array('required' => true, 'maxlength' => 255)), 'body' => array('type' => 'wysiwyg', 'title' => get_string('Body', 'interaction.forum'), 'rows' => 10, 'cols' => 70, 'defaultvalue' => isset($topic) ? $topic->body : null, 'rules' => array('required' => true)), 'sticky' => array('type' => 'checkbox', 'title' => get_string('Sticky', 'interaction.forum'), 'description' => get_string('stickydescription', 'interaction.forum'), 'defaultvalue' => isset($topic) && $topic->sticky == 1 ? 'checked' : null), 'closed' => array('type' => 'checkbox', 'title' => get_string('Closed', 'interaction.forum'), 'description' => get_string('closeddescription', 'interaction.forum'), 'defaultvalue' => isset($topic) && $topic->closed == 1 ? 'checked' : null), 'submit' => array('type' => 'submitcancel', 'value' => array(isset($topic) ? get_string('edit') : get_string('Post', 'interaction.forum'), get_string('cancel')), 'goto' => get_config('wwwroot') . 'interaction/forum/' . (isset($topic) && $returnto != 'view' ? 'topic.php?id=' . $topicid : 'view.php?id=' . $forumid)), 'post' => array('type' => 'hidden', 'value' => isset($topic) ? $topic->postid : false), 'editrecord' => array('type' => 'hidden', 'value' => isset($topic) ? $topic->editrecord : false)));
if (!$moderator) {
    unset($editform['elements']['sticky']);
    unset($editform['elements']['closed']);
}
$editform = pieform($editform);
开发者ID:Br3nda,项目名称:mahara,代码行数:31,代码来源:edittopic.php


示例11: __

		<?php 
                    break;
                case 'control_edit':
                    ?>
		<td><?php 
                    if (user_can_edit_post($user_ID, $post->ID)) {
                        echo "<a href='post.php?action=edit&amp;post={$id}' class='edit'>" . __('Edit') . "</a>";
                    }
                    ?>
</td>
		<?php 
                    break;
                case 'control_delete':
                    ?>
		<td><?php 
                    if (user_can_edit_post($user_ID, $post->ID)) {
                        echo "<a href='post.php?action=delete&amp;post={$id}' class='delete' onclick=\"return confirm('" . sprintf(__("You are about to delete this post \\'%s\\'\\n  \\'OK\\' to delete, \\'Cancel\\' to stop."), wp_specialchars(get_the_title('', ''), 1)) . "')\">" . __('Delete') . "</a>";
                    }
                    ?>
</td>
		<?php 
                    break;
                default:
                    ?>
		<td><?php 
                    do_action('manage_posts_custom_column', $column_name, $id);
                    ?>
</td>
		<?php 
                    break;
            }
开发者ID:BackupTheBerlios,项目名称:steampress-svn,代码行数:31,代码来源:edit.php


示例12: get_settings


//.........这里部分代码省略.........
         // Used to filter values
         $allowed_keys = array('author', 'date', 'category', 'title');
         $q['orderby'] = urldecode($q['orderby']);
         $q['orderby'] = addslashes_gpc($q['orderby']);
         $orderby_array = explode(' ', $q['orderby']);
         if (!in_array($orderby_array[0], $allowed_keys)) {
             $orderby_array[0] = 'date';
         }
         $q['orderby'] = $orderby_array[0] . ' ' . $q['order'];
         if (count($orderby_array) > 1) {
             for ($i = 1; $i < count($orderby_array); $i = $i + 1) {
                 // Only allow certain values for safety
                 if (in_array($orderby_array[$i], $allowed_keys)) {
                     $q['orderby'] .= ',post_' . $orderby_array[$i] . ' ' . $q['order'];
                 }
             }
         }
     }
     $now = gmdate('Y-m-d H:i:59');
     if ($pagenow != 'post.php' && $pagenow != 'edit.php') {
         $where .= " AND post_date_gmt <= '{$now}'";
         $distinct = 'DISTINCT';
     }
     if ($this->is_page) {
         $where .= ' AND (post_status = "static")';
     } elseif ($this->is_single) {
         $where .= ' AND (post_status != "static")';
     } else {
         $where .= ' AND (post_status = "publish"';
         if (isset($user_ID) && '' != intval($user_ID)) {
             $where .= " OR post_author = {$user_ID} AND post_status != 'draft' AND post_status != 'static')";
         } else {
             $where .= ')';
         }
     }
     // Apply filters on where and join prior to paging so that any
     // manipulations to them are reflected in the paging by day queries.
     $where = apply_filters('posts_where', $where);
     $join = apply_filters('posts_join', $join);
     // Paging
     if (empty($q['nopaging']) && !$this->is_single) {
         $page = $q['paged'];
         if (empty($page)) {
             $page = 1;
         }
         if ($q['what_to_show'] == 'posts') {
             $pgstrt = '';
             $pgstrt = (intval($page) - 1) * $q['posts_per_page'] . ', ';
             $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page'];
         } elseif ($q['what_to_show'] == 'days') {
             $startrow = $q['posts_per_page'] * (intval($page) - 1);
             $start_date = $wpdb->get_var("SELECT max(post_date) FROM {$wpdb->posts} {$join} WHERE (1=1) {$where} GROUP BY year(post_date), month(post_date), dayofmonth(post_date) ORDER BY post_date DESC LIMIT {$startrow},1");
             $endrow = $startrow + $q['posts_per_page'] - 1;
             $end_date = $wpdb->get_var("SELECT min(post_date) FROM {$wpdb->posts} {$join} WHERE (1=1) {$where} GROUP BY year(post_date), month(post_date), dayofmonth(post_date) ORDER BY post_date DESC LIMIT {$endrow},1");
             if ($page > 1) {
                 $where .= " AND post_date >= '{$end_date}' AND post_date <= '{$start_date}'";
             } else {
                 $where .= " AND post_date >= '{$end_date}'";
             }
         }
     }
     // Apply post-paging filters on where and join.  Only plugins that
     // manipulate paging queries should use these hooks.
     $where = apply_filters('posts_where_paged', $where);
     $where .= " GROUP BY {$wpdb->posts}.ID";
     $join = apply_filters('posts_join_paged', $join);
     $orderby = "post_" . $q['orderby'];
     $orderby = apply_filters('posts_orderby', $orderby);
     $request = " SELECT {$distinct} * FROM {$wpdb->posts} {$join} WHERE 1=1" . $where . " ORDER BY " . $orderby . " {$limits}";
     $this->posts = $wpdb->get_results($request);
     // Check post status to determine if post should be displayed.
     if ($this->is_single) {
         if ('publish' != $this->posts[0]->post_status) {
             if (!(isset($user_ID) && '' != intval($user_ID))) {
                 // User must be logged in to view unpublished posts.
                 $this->posts = array();
             } else {
                 if ('draft' == $this->posts[0]->post_status) {
                     // User must have edit permissions on the draft to preview.
                     if (!user_can_edit_post($user_ID, $this->posts[0]->ID)) {
                         $this->posts = array();
                     }
                 } elseif ('private' == $this->posts[0]->post_status) {
                     if ($this->posts[0]->post_author != $user_ID) {
                         $this->posts = array();
                     }
                 }
             }
         }
     }
     $this->posts = apply_filters('the_posts', $this->posts);
     $this->post_count = count($this->posts);
     if ($this->post_count > 0) {
         $this->post = $this->posts[0];
     }
     update_post_caches($this->posts);
     // Save any changes made to the query vars.
     $this->query_vars = $q;
     return $this->posts;
 }
开发者ID:BackupTheBerlios,项目名称:steampress-svn,代码行数:101,代码来源:classes.php


示例13: edit_post_link

function edit_post_link($link = 'Edit This', $before = '', $after = '') {
	global $user_ID, $post;

	get_currentuserinfo();

	if ( !user_can_edit_post($user_ID, $post->ID) ) {
		return;
	}

	if ( is_attachment() )
		return;
	else
		$file = 'post';

	$location = get_settings('siteurl') . "/wp-admin/{$file}.php?action=edit&amp;post=$post->ID";
	echo $before . "<a href=\"$location\">$link</a>" . $after;
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:17,代码来源:template-functions-links.php


示例14: edit_post_link

function edit_post_link($link = 'Edit This', $before = '', $after = '') {
    global $user_ID, $post;

    get_currentuserinfo();

	if (!user_can_edit_post($user_ID, $post->ID)) {
        return;
    }

    $location = get_settings('siteurl') . "/wp-admin/post.php?action=edit&amp;post=$post->ID";
    echo "$before <a href=\"$location\">$link</a> $after";
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:12,代码来源:template-functions-links.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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