我在寻找这样的东西:我有两个(或更多)用户组。每个小组对不同的人负责。例如,如果A组有人发送草稿,A组负责人会收到关于草稿的邮件,并可以发布此帖子。
抱歉,如果有什么不清楚的地方。我找不到这样的东西。
我在寻找这样的东西:我有两个(或更多)用户组。每个小组对不同的人负责。例如,如果A组有人发送草稿,A组负责人会收到关于草稿的邮件,并可以发布此帖子。
抱歉,如果有什么不清楚的地方。我找不到这样的东西。
add_action(\'future_to_pending\', \'send_emails_on_new_event\');
add_action(\'new_to_pending\', \'send_emails_on_new_event\');
add_action(\'draft_to_pending\', \'send_emails_on_new_event\');
add_action(\'auto-draft_to_pending\', \'send_emails_on_new_event\');
/**
* Send emails on event publication
*
* @param WP_Post $post
*/
function send_emails_on_new_event($post) {
$emails = "email_1@mail.com, email_2@mail.com"; //If you want to send to site administrator, use $emails = get_option(\'admin_email\');
$title = wp_strip_all_tags(get_the_title($post->ID));
$url = get_permalink($post->ID);
$message = "Link to post: \\n{$url}";
wp_mail($emails, "New post published: {$title}", $message);
}
$args = array( \'numberposts\' => \'10\', \'post_type\' => \'newposttype\'); $recent_posts = wp_get_recent_posts( $args ); 我知道这不是一件简单的事,但我如何根据屏幕宽度设置数字成本呢?也就是说:对于桌面访问者,我显示10篇帖子;对于移动访问者,我显示3篇帖子。