Yet more cleanup #45
This commit is contained in:
@ -21,6 +21,9 @@ class CWV2_Admin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hooks for the administrator panel
|
* Hooks for the administrator panel
|
||||||
|
*
|
||||||
|
* @author JayWood
|
||||||
|
*
|
||||||
* @since 3.6.3
|
* @since 3.6.3
|
||||||
*/
|
*/
|
||||||
function hooks() {
|
function hooks() {
|
||||||
@ -44,6 +47,9 @@ class CWV2_Admin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Centers custom column content
|
* Centers custom column content
|
||||||
|
*
|
||||||
|
* @author JayWood
|
||||||
|
*
|
||||||
* @since 3.6.3
|
* @since 3.6.3
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
@ -54,9 +60,11 @@ class CWV2_Admin {
|
|||||||
/**
|
/**
|
||||||
* Sets column data for the CWv3 column
|
* Sets column data for the CWv3 column
|
||||||
*
|
*
|
||||||
|
* @author JayWood
|
||||||
|
*
|
||||||
* @since 3.6.3
|
* @since 3.6.3
|
||||||
*
|
*
|
||||||
* @param $col
|
* @param string $col
|
||||||
*/
|
*/
|
||||||
public function set_col_data( $col ) {
|
public function set_col_data( $col ) {
|
||||||
global $post;
|
global $post;
|
||||||
@ -75,9 +83,11 @@ class CWV2_Admin {
|
|||||||
/**
|
/**
|
||||||
* Adds columns to the post list table
|
* Adds columns to the post list table
|
||||||
*
|
*
|
||||||
|
* @author JayWood
|
||||||
|
*
|
||||||
* @since 3.6.3
|
* @since 3.6.3
|
||||||
*
|
*
|
||||||
* @param $cols
|
* @param array $cols
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
@ -90,6 +100,8 @@ class CWV2_Admin {
|
|||||||
/**
|
/**
|
||||||
* Add metabox to post types
|
* Add metabox to post types
|
||||||
*
|
*
|
||||||
|
* @author JayWood
|
||||||
|
*
|
||||||
* @since 3.6.3
|
* @since 3.6.3
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -110,6 +122,9 @@ class CWV2_Admin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the post types that can be used with CWv2
|
* Gets the post types that can be used with CWv2
|
||||||
|
*
|
||||||
|
* @author JayWood
|
||||||
|
*
|
||||||
* @since 3.6.4
|
* @since 3.6.4
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
@ -123,6 +138,8 @@ class CWV2_Admin {
|
|||||||
/**
|
/**
|
||||||
* Saves meta data
|
* Saves meta data
|
||||||
*
|
*
|
||||||
|
* @author JayWood
|
||||||
|
*
|
||||||
* @since 3.6.3
|
* @since 3.6.3
|
||||||
*
|
*
|
||||||
* @param int $post_id
|
* @param int $post_id
|
||||||
@ -153,9 +170,12 @@ class CWV2_Admin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Render the meta box for CWv3
|
* Render the meta box for CWv3
|
||||||
|
*
|
||||||
|
* @author JayWood
|
||||||
|
*
|
||||||
* @since 3.6.3
|
* @since 3.6.3
|
||||||
*
|
*
|
||||||
* @param $post
|
* @param WP_Post $post
|
||||||
*/
|
*/
|
||||||
public function render_metabox( $post ) {
|
public function render_metabox( $post ) {
|
||||||
wp_nonce_field( plugin_basename( __FILE__ ), 'cwv3_meta' );
|
wp_nonce_field( plugin_basename( __FILE__ ), 'cwv3_meta' );
|
||||||
@ -170,5 +190,4 @@ class CWV2_Admin {
|
|||||||
<p class="description"><?php _e( 'Cannot be changed while site wide option is enabled.', 'content-warning-v2' ); ?></p>
|
<p class="description"><?php _e( 'Cannot be changed while site wide option is enabled.', 'content-warning-v2' ); ?></p>
|
||||||
<?php endif;
|
<?php endif;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user