This file contains 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( 'plugins_loaded', 'twp_remove_donate', 25 ); | |
function twp_remove_donate() { | |
global $TW_Premium; | |
remove_filter( 'plugin_row_meta', array( $TW_Premium, 'plugin_row_meta' ), 10, 2 ); | |
} | |
?> |
This file contains 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( 'cbqe_get_post_types_args', array( $this, 'get_post_types_args' ) ); | |
public function get_post_types_args( $args ) { | |
$args[ 'exclude_from_search' ] = true; | |
return $args; | |
} | |
?> |
This file contains 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( 'cbqe_quick_edit_custom_box_field', array( $this, 'quick_edit_custom_box_field' ), 10, 5 ); | |
public function quick_edit_custom_box_field( $input, $field_type, $field_name, $options, $bulk_mode ) { | |
$result = ''; | |
switch ( $field_type ) { | |
case 'date': | |
$result = '<input type="text" class="datepicker" name="' . $field_name . '" autocomplete="off" />'; | |
break; |
This file contains 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( 'cbqe_quick_scripts_quick', array( $this, 'scripts_quick' ), 10, 6 ); | |
public function scripts_quick( $scripts_quick, $post_type, $column_name, $field_name, $field_type, $field_name_var ) { | |
switch ( $field_type ) { | |
case 'date': | |
$scripts_quick[ $column_name . '1' ] = "var {$field_name_var} = $( '.column-{$column_name}', post_row ).text();"; | |
$scripts_quick[ $column_name . '2' ] = "$( ':input[name={$field_name}]', edit_row ).val( {$field_name_var} );"; | |
break; | |
} |
This file contains 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( 'cbqe_quick_scripts_extra', array( $this, 'scripts_extra' ), 10, 6 ); | |
public function scripts_extra( $scripts_extra, $post_type, $column_name, $field_name, $field_type, $field_name_var ) { | |
switch ( $field_type ) { | |
case 'date': | |
$key = Custom_Bulkquick_Edit::get_field_key( $post_type, $field_name ); | |
$date_format = cbqe_get_option( $key, 'mm/dd/yy' ); | |
$scripts_extra[ $column_name ] = "$( '.datepicker' ).datepicker({ dateFormat: '{$date_format}' });"; |
This file contains 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( 'cbqe_quick_scripts_bulk', array( $this, 'scripts_bulk' ), 10, 6 ); | |
public function scripts_bulk( $scripts_bulk, $post_type, $column_name, $field_name, $field_type, $field_name_var ) { | |
switch ( $field_type ) { | |
case 'date': | |
$scripts_bulk[ $column_name ] = "'{$field_name}': bulk_row.find( 'input[name={$field_name}]' ).val()"; | |
break; | |
} |
This file contains 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( 'custom_bulkquick_edit_manage_posts_custom_column_field_type', 'manage_posts_custom_column_field_type', 10, 4 ); | |
public function manage_posts_custom_column_field_type( $current, $field_type, $column, $post_id ) { | |
$result = ''; | |
switch ( $field_type ) { | |
case 'date': | |
$result = $current; | |
break; | |
} |
This file contains 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( 'custom_bulkquick_edit_settings_display_setting', 'display_setting', 10, 2 ); | |
public function display_setting( $args, $input ) { | |
$content = ''; | |
extract( $args ); | |
if ( is_null( $input ) ) { | |
$options = get_option( self::ID ); | |
} else { |
This file contains 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( 'custom_bulkquick_edit_settings_as_types', 'settings_as_types' ); | |
public function settings_as_types( $as_types ) { | |
$as_types['date'] = esc_html__( 'As date' ); | |
return $as_types; | |
} | |
?> |