Duplicate Posts and Pages (copy)

// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading

Accordion Template Helper

/** * For the Accordion Template, this is a helper script * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ add_action( ‘wp_head’, function () { ?>Continue reading

管理バーにマニュアルや外部リンクを設置する

//管理バーメニューにマニュアル設置 function add_link_other_site( $wp_admin_bar ) { if (is_user_logged_in() ){ $wp_admin_bar->add_node(array( ‘id’ => ‘manuallink’, ‘title’ => ‘マニュアル’, ‘href’ => ‘#’ )); } } add_action(‘admin_bar_menu’, ‘add_link_other_site’, 100); function add_link_target_blank() { if (is_user_logged_in() ){ printContinue reading

管理画面のメニュー制御(サイド、管理バー)

// 管理サイドバーメニューの非表示 function remove_menus(){ $user = wp_get_current_user(); if( $user-> get(‘user_login’) !== “admin_99”) { remove_menu_page( ‘edit.php?post_type=cta’ ); // CTA管理 remove_menu_page( ‘edit.php?post_type=aftag’ ); // タグ管理 remove_menu_page( ‘edit.php?post_type=afranking’ ); // タグランキング remove_menu_page( ‘siteguard’ ); remove_menu_page( ‘snippets’ ); remove_menu_page( ‘pmxe-admin-export’ ); remove_menu_page( ‘pmxi-admin-import’ );…Continue reading

投稿一覧にスラッグを表示

//投稿一覧にスラッグ表示 function add_posts_columns_slug($columns) { $columns[‘slug’] = ‘スラッグ’; return $columns; } function add_posts_columns_slug_row($column_name, $post_id) { if( ‘slug’ == $column_name ) { $slug = get_post($post_id) -> post_name; echo $slug; } } add_filter( ‘manage_edit-post_sortable_columns’, ‘add_posts_columns_slug’ ); add_filter( ‘manage_posts_columns’, ‘add_posts_columns_slug’ ); add_action( ‘manage_posts_custom_column’, ‘add_posts_columns_slug_row’,…Continue reading

How to Disable the Email Address Suggestion (copy)

/** * Disable the email address suggestion. * * @link https://wpforms.com/developers/how-to-disable-the-email-suggestion-on-the-email-form-field/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ add_filter( ‘wpforms_mailcheck_enabled’, ‘__return_false’ );Continue reading

footer

function remove_footer_admin () { echo ‘Fueled by WordPress | NYUFONEWS: UFO News ‘; } add_filter(‘admin_footer_text’, ‘remove_footer_admin’);Continue reading