How to create a wp admin page (for use in an ajax request)
Hey, changed my google search terms and found my answer. 🙂 http://codex.wordpress.org/AJAX_in_Plugins
Hey, changed my google search terms and found my answer. 🙂 http://codex.wordpress.org/AJAX_in_Plugins
You can do this with CSS. .metabox-prefs label[for=”postexcerpt-hide”] { display: none; } In regard to adding the CSS to the admin section, you have two options: Option 1: Add the CSS to a stylesheet and enqueue it using the admin_enqueue_scripts hook. function load_custom_wp_admin_style() { wp_register_style( ‘custom_wp_admin_css’, get_template_directory_uri() . ‘/admin-style.css’, false, ‘1.0.0’ ); wp_enqueue_style( ‘custom_wp_admin_css’ ); … Read more
I’d suggest asking your client what value is shown when adding media, as shown here in the screenshot. If the value shown is 1mb then i can tell you the function responsible is the following. function wp_max_upload_size() { $u_bytes = wp_convert_hr_to_bytes( ini_get( ‘upload_max_filesize’ ) ); $p_bytes = wp_convert_hr_to_bytes( ini_get( ‘post_max_size’ ) ); $bytes = apply_filters( … Read more
The problem was that I had changed the ‘WP_CONTENT_DIR’ directory, and WordPress did not have writing permission to the new content folder, so it couldn’t create the ‘WP_CONTENT_DIR’/languages folder. After creating the languages folder in my new WP_CONTENT_DIR directory WordPress did the language upgrade successfully.
In your usermeta database table, there will be rows containing a meta_key of edit_post_per_page find the row that matches your username and then either change the value to something more sensible, or delete that row to restore the default of 20. Or you could delete all rows in that table with that key, it’s not … Read more
Which actions can update/change .php files?
add_action(‘admin_menu’, ‘remove_wpseo_admin_menu_links’); function remove_wpseo_admin_menu_links(){ remove_action( ‘admin_bar_menu’, ‘wpseo_admin_bar_menu’, 95 ); remove_menu_page( ‘wpseo_dashboard’ ); }
One way to do that is to enable WP_DEBUG_LOG in wp-config.php. The file will look like this: define( ‘WP_DEBUG’, true ); define( ‘WP_DEBUG_DISPLAY’, false ); define( ‘WP_DEBUG_LOG’, true ); //You may also set the log file path instead of just true Defining WP_DEBUG_LOG as true will save logs under wp-content/debug.log and you’ll find the PHP … Read more
Is there an easy way… AFAIK, no, not at all. If using a single site installation, you’d need to carefully disable (not hide, disable) all possible user actions that modify things. And this has to be done screen by screen (Posts, Pages, Comments, Appearance, Plugins, etc). For example, in the All Posts screen (/wp-admin/edit.php): /** … Read more
It is not really difficult. Manage columns in posts list you can with 2 hooks: manage_posts_columns, manage_posts_custom_column add_filter(‘manage_posts_columns’, ‘wordcount_column’); function wordcount_column($columns) { $columns[‘wordcount’] = ‘Word count’; return $columns; } add_action(‘manage_posts_custom_column’, ‘show_wordcount’); function show_wordcount($name) { global $post; switch ($name) { case ‘wordcount’: $wordcount = YOUR_WORD_COUNT_VALUE echo $wordcount; } } Then you only need calc word count … Read more