How can I add ‘view mode’ to screen options for pages and cpts?

Currently the excerpt view is limited to non-hierarchical post types. We are able to filter the view mode in the Screen Options: with the view_mode_post_types filter, introduced within ticket #22222 in changeset #35357: /** * Filters the post types that have different view mode options. * * @since 4.4.0 * * @param array $view_mode_post_types Array … Read more

Rename W3 Total Cache admin menu

You may be able to use the WordPress filter ‘gettext’: http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext add_filter( ‘gettext’, ‘rename_menu_item’ ); function rename_menu_item( $translated ) { $translated = str_replace( ‘Performance’, ‘Ytelse’, $translated ); return $translated; }

Cookie value cannot be read until I’ve logged into the WP admin

It appears I needed to use an earlier hook. Using the wp or init action hooks allow me to read the cookie’s value without logging into the admin first. function output_test_cookie() { if ( isset( $_COOKIE[‘test-cookie’] ) ) echo $_COOKIE[“test-cookie”]; } add_action( ‘wp’, ‘output_test_cookie’ ); // wp or init is needed