plugin author.', 'simpletags' ), 'error' ); return false; } if ( isset( $_POST['tags'] ) ) { $counter = 0; foreach ( (array) $_POST['tags'] as $object_id => $tag_list ) { // Trim data $tag_list = trim( stripslashes( $tag_list ) ); // String to array $tags = explode( ',', $tag_list ); // Remove empty and trim tag $tags = array_filter( $tags, '_delete_empty_element' ); // Add new tag (no append ! replace !) wp_set_object_terms( $object_id, $tags, SimpleTags_Admin::$taxonomy ); $counter ++; // Clean cache clean_post_cache( $object_id ); } add_settings_error( __CLASS__, __CLASS__, sprintf( __( '%1$s %2$s(s) terms updated with success !', 'simpletags' ), (int) $counter, strtolower( SimpleTags_Admin::$post_type_name ) ), 'updated' ); return true; } } return false; } /** * WP Page - Mass edit tags * */ public static function pageMassEditTags() { global $wpdb, $wp_locale, $wp_query; list( $post_stati, $avail_post_stati ) = self::edit_data_query(); if ( ! isset( $_GET['paged'] ) ) { $_GET['paged'] = 1; } // Display message settings_errors( __CLASS__ ); ?>

add_query_arg( 'paged', '%#%' ), 'format' => '', 'total' => ceil( $wp_query->found_posts / $posts_per_page ), 'current' => ( (int) $_GET['paged'] ) ) ); if ( $page_links ) { echo "
$page_links
"; } ?>
get_results( $wpdb->prepare( "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = %s ORDER BY post_date DESC", SimpleTags_Admin::$post_type ) ); $month_count = count( $arc_result ); if ( ! isset( $_GET['m'] ) ) { $_GET['m'] = ''; } if ( $month_count && ! ( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?>


plugin\'s homepage for further details. If you find a bug, or have a fantastic idea for this plugin, ask me !', 'simpletags' ); ?>

array( _x( 'Published', 'post' ), __( 'Published posts' ), _n_noop( 'Published (%s)', 'Published (%s)' ) ), 'future' => array( _x( 'Scheduled', 'post' ), __( 'Scheduled posts' ), _n_noop( 'Scheduled (%s)', 'Scheduled (%s)' ) ), 'pending' => array( _x( 'Pending Review', 'post' ), __( 'Pending posts' ), _n_noop( 'Pending Review (%s)', 'Pending Review (%s)' ) ), 'draft' => array( _x( 'Draft', 'post' ), _x( 'Drafts', 'manage posts header' ), _n_noop( 'Draft (%s)', 'Drafts (%s)' ) ), 'private' => array( _x( 'Private', 'post' ), __( 'Private posts' ), _n_noop( 'Private (%s)', 'Private (%s)' ) ), ); $post_stati = apply_filters( 'post_stati', $post_stati ); $avail_post_stati = get_available_post_statuses( SimpleTags_Admin::$post_type ); $post_status_q = ''; if ( isset( $q['post_status'] ) && in_array( $q['post_status'], array_keys( $post_stati ) ) ) { $post_status_q = '&post_status=' . $q['post_status']; $post_status_q .= '&perm=readable'; } elseif ( ! isset( $q['post_status'] ) ) { $q['post_status'] = ''; } if ( 'pending' === $q['post_status'] ) { $order = 'ASC'; $orderby = 'modified'; } elseif ( 'draft' === $q['post_status'] ) { $order = 'DESC'; $orderby = 'modified'; } else { $order = 'DESC'; $orderby = 'date'; } wp( "post_type={$q['post_type']}&what_to_show=posts$post_status_q&posts_per_page={$q['posts_per_page']}&order=$order&orderby=$orderby" ); return array( $post_stati, $avail_post_stati ); } }