This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: My Plugin | |
Author: Jesper van Engelen | |
Author URI: http://jepps.nl | |
*/ | |
/** | |
* Main plugin class for My Plugin | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class JWF_Fields | |
{ | |
protected static $fieldtypes = array(); | |
/** | |
* Using a private constructor to make sure the class doesn't get instantiated | |
* | |
* @access private |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: My Plugin | |
Version: 0.1 | |
*/ | |
class JWF_Plugin | |
{ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'cac/loaded', 'myplugin_admincolumns_loaded' ); | |
function myplugin_admincolumns_loaded( $cac_instance ) { | |
// Stuff! | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'cac/column/default_options', 'myplugin_cac_column_default_options', 10, 2 ); | |
function myplugin_cac_column_default_options( $default_options, $column_instance ) { | |
// Stuff! | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'cac/column/default_options', 'myplugin_cac_title_column_editable', 10, 2 ); | |
function myplugin_cac_title_column_editable( $default_options, $column_instance ) { | |
if ( $column_instance->properties->type == 'title' && ! empty( $column_instance->properties->is_ed | |
) ) { | |
$default_options['edit'] = 'on'; | |
} | |
return $default_options; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'cac/post_types', 'myplugin_cac_post_types' ); | |
function myplugin_cac_post_types( $post_types ) { | |
// Stuff! | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'cac/post_types', 'myplugin_cac_disable_posttype_post' ); | |
function myplugin_cac_disable_posttype_post( $post_types ) { | |
if ( isset( $post_types['post'] ) ) { | |
unset( $post_types['post'] ); | |
} | |
return $post_types; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'cac/is_cac_screen', 'myplugin_is_cac_screen' ); | |
function myplugin_is_cac_screen( $is_cac_screen ) { | |
// Possibly modify $is_cac_screen | |
return $is_cac_screen; | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'cac/is_cac_screen', 'myplugin_wpml_is_cac_screen' ); | |
function myplugin_wpml_is_cac_screen( $is_columns_screen ) { | |
if ( isset( $_GET['page'] ) && $_GET['page'] == 'wpml-string-translation/menu/string-translation.php' ) { | |
return true; | |
} | |
return $is_columns_screen; | |
} |
OlderNewer