Does WordPress Development Mode Exist (with not minified JS)?
Yes there is, from Debugging in WordPress codex, you need to define SCRIPT_DEBUG in wp-config.php to force WP to load the dev versions of the scripts: define(‘SCRIPT_DEBUG’, true);
Yes there is, from Debugging in WordPress codex, you need to define SCRIPT_DEBUG in wp-config.php to force WP to load the dev versions of the scripts: define(‘SCRIPT_DEBUG’, true);
The Reply links I assume your Reply links look like this: <a class=”comment-reply-link” href=”http://wordpress.stackexchange.com/2013/12/29/hello-world/?replytocom=32#respond” onclick=”return addComment.moveForm(‘comment-32′, ’32’, ‘respond’, ‘1’)”>Reply</a> and the Cancel Reply link: <a rel=”nofollow” id=”cancel-comment-reply-link” href=”http://wordpress.stackexchange.com/2013/12/29/hello-world/#respond” style=””>Cancel reply</a> The Javascript method addComment.moveForm is defined in /wp-includes/js/comment-reply.min.js. Demo plugin: To hide the extra Subject field for comments replies, you can try to check for … Read more
The post ID is available after the query has been fired. The first hook that is safe to get post id is ‘template_redirect’. If you can modify your function to accept a post id as argument, like so: function em_change_form($id){ $reg_type = filter_input(INPUT_GET, ‘reg_typ’, FILTER_SANITIZE_STRING); if($reg_type === ‘vln’){ update_post_meta($id,’custom_booking_form’, 2); } elseif ($reg_type == ‘rsvp’) … Read more
With get_terms(), the exclude parameter takes an array of term IDs, so just add the second term to the array: $terms = get_terms( TribeEvents::TAXONOMY, array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘exclude’ => array( 77, 71 ), ) ); echo ‘<li>Category:</li>’; foreach ( $terms as $term ) { echo ‘<li><a href=”‘.$url.’?tribe_eventcategory=’.$term->term_taxonomy_id.'”>’.$term->name.'</a></li>’; }
Hook into postbox_classes. postbox_classes is the function which will output the classes for the metabox. apply_filters( “postbox_classes_{$page}_{$id}”, $classes ) Your code could look like this: add_action( ‘add_meta_boxes’, ‘add_my_metabox’ ); function add_my_metabox() { $id = ‘my-metabox’; $title=”My Metabox”; $callback = ‘my_metabox_content’; $page=”post”; add_meta_box( $id, $title, $callback, $page ); add_filter( “postbox_classes_{$page}_{$id}”, ‘minify_my_metabox’ ); } function my_metabox_content() { … Read more
See this related question. I guess in your case you’d wrap your code in if( $args->theme_location == ‘primary-menu’ ).
This function exists in wp-admin/includes/plugin.php so I’m assuming it doesn’t get included by the theme. You can either require it, or just create your own version of it – see here: http://wordpress.org/support/topic/is_plugin_active UPDATED: Please check is_plugin_active
You’ll want to use a custom post type for this. But don’t let the terms “custom post type” scare you off. For example, one of my clients needed to present a “line card” displaying their various partners. All they wanted, originally, was the name and logo of their various partners. After I built out the … Read more
It’s not possible to call a private method through an action or filter. When calling add_action or add_filter, WordPress adds the callback to a list of callbacks for that specific action or filter. Then, when do_action or apply_filters is called, WordPress uses call_user_func_array to call the linked functions and methods. As call_user_func_array is not called … Read more
see remove_post_type_support function remove_pages_editor(){ remove_post_type_support( ‘page’, ‘editor’ ); } add_action( ‘init’, ‘remove_pages_editor’ );