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 | |
/** | |
* LearnDash LMS for Custom Bulk/Quick Edit plugin | |
* | |
* Download and unpack this Gist into your theme folder. Then include this script itself in your theme's `functions.php` file via… | |
* | |
* require_once get_stylesheet_directory() . '/35b676bb68eee50737f3/cbqe-learndash-lms.php'; | |
* | |
* In WordPress Admin > Settings > Custom Bulk/Quick, configure your fields as needed, per below. If configuration updates are needed, either manually edit them or remove the current field configuration and click Save Changes for automatic updates. | |
* |
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
// @ref http://rachelcarden.com/2012/03/manage-wordpress-posts-using-bulk-edit-and-quick-edit/ | |
(function($) { | |
// we create a copy of the WP inline edit post function | |
var $wp_inline_edit = inlineEditPost.edit; | |
// and then we overwrite the function with our own code | |
inlineEditPost.edit = function( id ) { | |
// "call" the original WP edit function | |
// we don't want to leave WordPress hanging | |
$wp_inline_edit.apply( this, arguments ); |
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 | |
/* | |
Plugin Name: Purge Transients | |
Description: Purge old transients | |
Version: 0.1 | |
Author: Seebz | |
*/ | |
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
function register_attachment_taxonomy() { | |
add_post_type_support('attachment', 'post_tag'); | |
register_taxonomy_for_object_type('post_tag', 'attachment'); | |
} | |
add_action('admin_init', 'register_attachment_taxonomy'); | |
// add_filter('wp_read_image_metadata', 'read_all_image_metadata', '', 3); | |
function add_attachment_post_tags( $meta, $attachment_id ) { |
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_post_types_ignore', 'bhc_cbqe_post_types_ignore' ); | |
function bhc_cbqe_post_types_ignore( $post_types ) { | |
foreach ( $post_types as $key => $value ) { | |
if ( 'page' == $value ) | |
unset( $post_types[ $key ] ); | |
} | |
return $post_types; | |
} |
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; |
NewerOlder