Changeset 3656 for sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/showcase/rosetta-showcase.php
- Timestamp:
- 07/08/2016 11:30:15 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/showcase/rosetta-showcase.php
r3655 r3656 21 21 */ 22 22 public function __construct() { 23 add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ));23 add_action( 'plugins_loaded', [ $this, 'plugins_loaded' ] ); 24 24 } 25 25 … … 41 41 */ 42 42 public function register_post_type() { 43 $labels = array(43 $labels = [ 44 44 'name' => _x( 'Showcase', 'post type general name', 'rosetta' ), 45 45 'singular_name' => _x( 'Showcase Site', 'post type singular name', 'rosetta' ), … … 52 52 'not_found' => __( 'Nothing found', 'rosetta' ), 53 53 'not_found_in_trash' => __( 'Nothing found in Trash', 'rosetta' ), 54 );55 56 $args = array(54 ]; 55 56 $args = [ 57 57 'labels' => $labels, 58 58 'public' => true, … … 66 66 'can_export' => false, 67 67 'exclude_from_search' => true, 68 'supports' => array( 'title', 'excerpt' ),68 'supports' => [ 'title', 'excerpt' ], 69 69 'menu_icon' => 'dashicons-slides', 70 70 'register_meta_box_cb' => [ $this, 'register_showcase_meta_box' ], 71 );71 ]; 72 72 73 73 register_post_type( $this->post_type, $args ); … … 121 121 ?> 122 122 <p><label for="rosetta_showcase_url"><?php _e( 'URL', 'rosetta' ); ?></label> 123 <input style="margin-left: 0; width: 98%" name="rosetta_showcase_url" type="text" value="<?php echo esc_url( $url ); ?>" /></p>123 <input style="margin-left: 0; width: 98%" name="rosetta_showcase_url" id="rosetta_showcase_url" type="text" value="<?php echo esc_url( $url ); ?>" /></p> 124 124 <label for="excerpt"><?php _e( 'Description', 'rosetta' ); ?></label> 125 125 <textarea rows="1" cols="40" name="excerpt" tabindex="6" id="excerpt"><?php echo $post->post_excerpt; // textarea_escaped ?></textarea> … … 158 158 * Disables Jetpack's sharing meta box for a showcase item. 159 159 * 160 * @param $enable Whether the metabox is visible161 * @param WP_Post $post 162 * @return bool True if metabox is visible, false if not.160 * @param bool $enable Whether the metabox is enabled. 161 * @param WP_Post $post Post object. 162 * @return bool True if metabox is enabled, false if not. 163 163 */ 164 164 public function disable_sharing_meta_box( $enable, $post ) {
Note: See TracChangeset
for help on using the changeset viewer.