Changeset 13109 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
- Timestamp:
- 01/15/2024 05:23:52 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
r13033 r13109 7 7 use \WordPressdotorg\Plugin_Directory\Readme\Validator; 8 8 use \WordPressdotorg\Plugin_Directory\Admin\List_Table\Plugin_Posts; 9 10 use const \WordPressdotorg\Plugin_Directory\PLUGIN_FILE; 11 use const \WordPressdotorg\Plugin_Directory\PLUGIN_DIR; 9 12 10 13 /** … … 37 40 add_filter( 'admin_head-edit.php', array( $this, 'plugin_posts_list_table' ) ); 38 41 add_action( 'edit_form_top', array( $this, 'show_permalink' ) ); 42 add_action( 'post_edit_form_tag', array( $this, 'post_edit_form_tag' ) ); 39 43 add_action( 'admin_notices', array( $this, 'add_post_status_notice' ) ); 40 44 add_action( 'all_admin_notices', array( $this, 'admin_notices' ) ); … … 70 74 add_action( 'save_post', array( __NAMESPACE__ . '\Metabox\Author_Notice', 'save_post' ) ); 71 75 add_action( 'save_post', array( __NAMESPACE__ . '\Metabox\Reviewer', 'save_post' ) ); 76 add_action( 'save_post', array( __NAMESPACE__ . '\Metabox\Review_Tools', 'save_post' ) ); 72 77 } 73 78 … … 129 134 switch ( $hook_suffix ) { 130 135 case 'post.php': 131 wp_enqueue_style( 'plugin-admin-post-css', plugins_url( 'css/edit-form.css', Plugin_Directory\PLUGIN_FILE ), array( 'edit' ), 7 ); 132 wp_enqueue_script( 'plugin-admin-post-js', plugins_url( 'js/edit-form.js', Plugin_Directory\PLUGIN_FILE ), array( 'wp-util', 'wp-lists' ), 5 ); 136 wp_enqueue_style( 'plugin-admin-post-css', plugins_url( 'css/edit-form.css', PLUGIN_FILE ), array( 'edit' ), filemtime( PLUGIN_DIR . '/css/edit-form.css') ); 137 wp_enqueue_script( 'plugin-admin-post-js', plugins_url( 'js/edit-form.js',PLUGIN_FILE ), array( 'wp-util', 'wp-lists', 'wp-api' ), filemtime( PLUGIN_DIR . '/js/edit-form.js') ); 138 133 139 wp_localize_script( 'plugin-admin-post-js', 'pluginDirectory', array( 134 140 'approvePluginAYS' => __( 'Are you sure you want to approve this plugin?', 'wporg-plugins' ), … … 400 406 if ( 'plugin' === $post->post_type && 'publish' === $post->post_status ) { 401 407 echo get_sample_permalink_html( $post ); 408 } 409 } 410 411 /** 412 * Allow file uploads within the plugin edit screen. 413 */ 414 public function post_edit_form_tag( $post ) { 415 if ( 'plugin' === $post->post_type ) { 416 echo ' enctype="multipart/form-data"'; 402 417 } 403 418 }
Note: See TracChangeset
for help on using the changeset viewer.