Move WPCode Status Column

add_filter( ‘wpcode_code_snippets_table_columns’, function ( $columns ) { if ( isset( $columns[‘status’] ) ) { $status = $columns[‘status’]; unset( $columns[‘status’] ); $columns = array_slice( $columns, 0, 1, true ) + array( ‘status’ => $status ) + array_slice( $columns, 1, count( $columns…Continue reading

Changes Posts to Client Portals

add_action( ‘admin_menu’, ‘change_post_menu_label’ ); function change_post_menu_label() { global $menu; global $submenu; // Loop through the menu items to find the one we want foreach ( $menu as $key => $value ) { if ( $value[0] == ‘Posts’ ) { //…Continue reading

Display Post and Page IDs in WordPress Columns

// // Add custom columns to post and page lists function custom_add_id_columns($columns) { $columns[‘post_id’] = ‘ID’; // For Posts $columns[‘page_id’] = ‘ID’; // For Pages return $columns; } add_filter(‘manage_posts_columns’, ‘custom_add_id_columns’); add_filter(‘manage_pages_columns’, ‘custom_add_id_columns’); // Populate the custom columns with IDs function…Continue reading

Add Featured Image Column

add_filter( ‘manage_posts_columns’, function ( $columns ) { // You can change this to any other position by changing ‘title’ to the name of the column you want to put it after. $move_after = ‘title’; $move_after_key = array_search( $move_after, array_keys( $columns…Continue reading

Freshdesk Support Widget

function add_freshworks_embed_code_script_in_admin() { echo ““; echo ““; } add_action( ‘admin_footer’, ‘add_freshworks_embed_code_script_in_admin’ );Continue reading

admin – function – Allow SVG Files Upload

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading