Tag Info

Hot answers tagged

4

I don’t know how to move the notices to the bottom or if that’s possible at all. To disable the debug mode in wp-admin write in wp-config.php: define( 'WP_DEBUG', FALSE === strpos( $_SERVER['REQUEST_URI'], '/wp-admin/' ) ); Untested: You could try to enable warnings in admin with: // happens early in wp-admin/admin.php add_filter( ...


3

This is a bug (one that I've encountered before) and could do with a ticket in trac (since I never took the time to submit one!) The trouble starts with requests that set multiple is_* query flags as true (specifically flags that represent objects, such as single posts, pages, and post type & term archives). This is because there can only ever be one ...


2

Try this. I cleaned up your arg array and placed everything in a function. Also, why are you using the getInstance method when your efpd_admin_notice is public? See the code below for accessing this method properly. function plugin_update(){ $plugin_update = Efpdd::efpd_admin_notice(array( 'type' => 'update', 'message' => 'The ...


2

The basic idea for debug here is that theme apparently influences something it totally should not. Either something is done in a wrong way or in a wrong place. Check that theme is not running any functionality directly in functions.php. Check that all of theme's functionality runs on appropriate hooks. For hooks that are used both on front-end and back-end ...


2

There is an action, 'core_upgrade_preamble', which can be added to output anything you would like at the bottom of the upgrade-core page. For example, try: add_action('core_upgrade_preamble', 'add_custom_upgrade_core_message'); function add_custom_upgrade_core_message(){ echo "<p>HI THERE</p>"; } That should work to meet your needs.


1

This would be an good use PHP 5.3+ anonymous functions. Closure example: <?php function Twit_the_url( $post_ID ) { //connect to twitter api //send tweet with url //get twitter response //send response to admin notice : add_action('admin_notices', function() use ($httpstatus) { echo '<div class="error"><p>', ...


1

Given that the page works if you leave the original query alone, your solution is pretty simple. Leave the original query alone. You don't need to overwrite that query in order to created secondary loops. Instead of this: query_single('dealers', 'publish', '1', $taxtype, $value); if (have_posts()) : while (have_posts()) : the_post(); You ...


1

You could use /wp-admin/admin-post.php. Link: $url = admin_url( 'admin-post.php?action=somethingunique' ); print "<a href='$url'>Update and redirect</a>"; Then you should register a callback for that action: add_action( 'admin_post_somethingunique', 'wpse_85825_callback' ); And in that callback you can do what you want: function ...


1

Here is what I did. In my taxonomy archive template I was relying on is_post_type_archive() to output additional div tags. add_action( 'parse_query', 'orb_parse_query' ); function orb_parse_query( $wp_query ) { global $post_type_obj; if ( $wp_query->is_post_type_archive && $wp_query->is_tax ) { $post_type_obj = get_queried_object(); ...


1

The issue is in using the $post variable for arguments. After changing this to something like $new_post I no longer get the notices. There must be some conflict with the global $post that WordPress uses. I took this from the Codex, but looking back at the page, I realize that $post was just referring the argument name and the actual example in the codex ...



Only top voted, non community-wiki answers of a minimum length are eligible