WP Cron emails not working
This should be a comment, but I don’t have comment privelages 🙁 I had this exact problem not long ago, and felt stupid when I realised it was because I had set a password on the directory…
This should be a comment, but I don’t have comment privelages 🙁 I had this exact problem not long ago, and felt stupid when I realised it was because I had set a password on the directory…
I am assuming that you already followed the tutorials on setting up xDebug on PHP installation and PhpStorm. Let me know if you need some help with that. I am using xDebug Helper extension on Chrome. Install it too. With the extension installed: In PhpStorm, go to Run > Start Listening for PHP Debug Connections. … Read more
On WP side the only handling it does is setting log to WP_CONTENT_DIR . ‘/debug.log’ if WP_DEBUG_LOG is enabled (highly bad idea in production environment as public location). If I remember right the very early implementations of this constant allowed to customize the path, but that’s no longer the case. In my experience ini_set( ‘log_errors’, … Read more
One option is setting the site’s URL in the wp-config.php file itself. This effectively overrides the siteurl option that’s otherwise stored in the database, but it also means you can reference the URL without doing a query. From the Codex: It is possible to set the site URL manually in the wp-config.php file. Add these … Read more
You aren’t echoing anything so you aren’t going to get much of an AJAX response. All you are doing with AJAX, really, is loading a webpage with Javascript. If the page doesn’t print anything, you don’t see anything. You don’t need to return anything from AJAX but if you don’t you will have a hard … Read more
There’s a global variable called $wp_scripts which is an instance of the WP_Scripts class. It doesn’t have a public API for looking at registered or enqueued scripts, but you can look inside the object and see what’s going on. You can see all the registered scripts with: global $wp_scripts; var_dump( $wp_scripts->registered ); To see the … Read more
You have the right approach. You will want to use the admin_enqueue_scripts hook: add_action( ‘admin_enqueue_scripts’, ‘wpse_239302_hide_action_links’ ); function wpse_239302_hide_action_links() { global $pagenow; if ( $pagenow == ‘plugins.php’ ) { ?> <style type=”text/css”> .visible .proupgrade, .visible .docs, .visible .forum, .visible .jetpack-home, .visible .support { display: none; } </style> <?php } }
Just a quick update that a new method is_main_query() has been introduced in WP 3.3. Example: add_action( ‘pre_get_posts’, ‘foo_modify_query_exclude_category’ ); function foo_modify_query_exclude_category( $query ) { if ( $query->is_main_query() && ! $query->get( ‘cat’ ) ) $query->set( ‘cat’, ‘-5’ ); } Resources: WPDevel: New API in 3.3: is_main_query() Codex reference: is_main_query() Related Trac Ticket #18677
The items are set up in wp_nav_menu(). There is a useful filter you can use: ‘wp_nav_menu_objects’. It offers the items as $sorted_menu_items and the arguments of the wp_nav_menu() call as $args. From wp-includes/nav-menu-template.php::wp_nav_menu(): $sorted_menu_items = apply_filters( ‘wp_nav_menu_objects’, $sorted_menu_items, $args ); So … hook into this filter, store the data somewhere, return the $sorted_menu_items unchanged and … Read more
There’s a native PHP function get_included_files() for that. Simply attach it to an action on the hook from where you want to know it. The first one is muplugins_loaded and the last accessible on is shutdown. add_action( ‘muplugins_loaded’, function() { $files = get_included_files(); foreach ( $files as $f ) echo $f.'<br>’; // or… var_dump( $files … Read more