Changeset 2752 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
- Timestamp:
- 03/15/2016 08:02:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
r2737 r2752 30 30 31 31 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) ); 32 32 33 add_action( 'wp_ajax_replyto-comment', array( $this, 'save_custom_comment' ), 0 ); 33 34 add_filter( 'postbox_classes_plugin_internal-notes', array( $this, 'postbox_classes' ) );35 34 add_filter( 'comment_row_actions', array( $this, 'custom_comment_row_actions' ), 10, 2 ); 35 36 add_filter( 'postbox_classes_plugin_internal-notes', array( __NAMESPACE__ . '\Metabox\Internal_Notes', 'postbox_classes' ) ); 37 add_filter( 'postbox_classes_plugin_plugin-committers', array( __NAMESPACE__ . '\Metabox\Committers', 'postbox_classes' ) ); 38 add_filter( 'wp_ajax_add-committer', array( __NAMESPACE__ . '\Metabox\Committers', 'add_committer' ) ); 39 add_filter( 'wp_ajax_delete-committer', array( __NAMESPACE__ . '\Metabox\Committers', 'remove_committer' ) ); 36 40 } 37 41 … … 61 65 global $post_type; 62 66 63 if ( 'post.php' == $hook_suffix && 'plugin'== $post_type ) {67 if ( 'post.php' === $hook_suffix && 'plugin' === $post_type ) { 64 68 wp_enqueue_style( 'plugin-admin-edit-css', plugins_url( 'css/edit-form.css', Plugin_Directory\PLUGIN_FILE ), array( 'edit' ), 1 ); 65 wp_enqueue_script( 'plugin-admin-edit-js', plugins_url( 'js/edit-form.js', Plugin_Directory\PLUGIN_FILE ), array( 'wp-util' ), 1 ); 69 wp_enqueue_script( 'plugin-admin-edit-js', plugins_url( 'js/edit-form.js', Plugin_Directory\PLUGIN_FILE ), array( 'wp-util', 'wp-lists' ), 1 ); 70 wp_localize_script( 'plugin-admin-edit-js', 'pluginDirectory', array( 71 'removeCommitterAYS' => __( 'Are you sure you want to remove this committer?', 'wporg-plugins' ), 72 ) ); 66 73 } 67 74 } … … 133 140 update_post_meta( $post_id, 'tested', wp_slash( wp_unslash( $_POST['tested_with'] ) ) ); 134 141 } 135 }136 137 /**138 * Filters the postbox classes for custom comment meta boxes.139 *140 * @param array $classes An array of postbox classes.141 * @return array142 */143 public function postbox_classes( $classes ) {144 $classes[] = 'comments-meta-box';145 146 return array_filter( $classes );147 142 } 148 143 … … 160 155 */ 161 156 public function custom_comment_row_actions( $actions, $comment ) { 162 if ( 'internal-note' === $comment->comment_type ) {157 if ( 'internal-note' === $comment->comment_type && isset( $_REQUEST['mode'] ) && 'single' === $_REQUEST['mode'] ) { 163 158 $allowed_actions = array( 'reply' => true ); 164 159
Note: See TracChangeset
for help on using the changeset viewer.