Plugin Directory

Changeset 1384731


Ignore:
Timestamp:
04/02/2016 01:47:48 AM (10 years ago)
Author:
jeffreysmattson
Message:

Update to fix the metabox removal bug.

Location:
l7-admin-help-videos
Files:
31 added
4 edited

Legend:

Unmodified
Added
Removed
  • l7-admin-help-videos/trunk/includes/functions.php

    r1268060 r1384731  
    102102                'post_type' => $post_type,
    103103                'post_status' => 'publish',
    104                 'no_found_rows' => true,
     104                'posts_per_page' => 10,
     105                'caller_get_posts' => 1,
    105106                );
    106107        }
     
    126127                    ),
    127128                'post_status' => 'publish',
    128                 'no_found_rows' => true,
     129                'posts_per_page' => 10,
     130                'caller_get_posts' => 1,
    129131            );
    130132        }
  • l7-admin-help-videos/trunk/includes/options-page.php

    r1267057 r1384731  
    1414     */
    1515    public function __construct() {
    16         include_once( plugin_dir_path( __FILE__ ) . 'functions.php' );
     16        include_once( 'functions.php' );
    1717        if ( ! isset( $this->admin_help_video_functions) ){
    1818            $this->admin_help_video_functions = new AdminHelpVideoFunctions;
     
    110110    public function l7whv_user_roles(){
    111111        $options = get_option( 'l7whv_help_video_options' );
    112        
    113         // Editor
     112
    114113        $editor = $this->l7hv_default_settings( 'editor' );
    115114        if ( '1' == $editor ){
    116115            $checked_editor = 'checked';
    117116        }
    118         else {
    119             $checked_editor = '';
    120         }
    121 
    122         // Author
     117
    123118        $author = $this->l7hv_default_settings( 'author' );
    124119        if ( '1' == $author ){
    125120            $checked_author = 'checked';
    126121        }
    127         else {
    128             $checked_author = '';
    129         }
    130 
    131         // Contributer
     122
    132123        $contributor = $this->l7hv_default_settings( 'contributor' );
    133124        if ( '1' == $contributor ){
    134125            $checked_cont = 'checked';
    135126        }
    136         else {
    137             $checked_cont = '';
    138         }
    139 
    140         // Subscriber
     127
    141128        $subscriber = $this->l7hv_default_settings( 'subscriber' );
    142129        if ( '1' == $subscriber ){
    143130            $checked_sub = 'checked';
    144131        }
    145         else {
    146             $checked_sub = '';
    147         }
    148 
    149132        $output = "<label class='checkbox-inline'><input type='checkbox' value='1' name='l7whv_help_video_options[subscriber]'" . $checked_sub . '>Subscriber</label>';
    150133        $output .= "<label class='checkbox-inline'><input type='checkbox' value='1' name='l7whv_help_video_options[contributor]'" . $checked_cont . '>Contributor</label>';
  • l7-admin-help-videos/trunk/l7-admin-help-videos.php

    r1268060 r1384731  
    44 * Plugin URI: layer7web.com
    55 * Description: Provide help videos on the admin side to people using their Wordpress install.
    6  * Version: 1.1.0
     6 * Version: 1.1.1
    77 * Author: Jeffrey S. Mattson
    88 * Author URI: https://github.com/jeffreysmattson
     
    8282         * Takes an array of links for the plugin page and adds a new settings link to it
    8383         * It will display on the "installed plugins page"
    84          * @param  [array] $links Array of links for the plugins page.
    85          * @return [array]        Returns the link array with the new link added.
     84         * @param   $links  Array of links for the plugins page.
     85         * @return          Returns the link array with the new link added.
    8686         */
    8787        function l7whv_settings_link( $links ) {
     
    9999         */
    100100        public function l7hv_sort_videos(){     
    101            
    102101            /**
    103102             * Include and create function object
    104103             */
    105             include_once( plugin_dir_path( __FILE__ ) . 'includes/functions.php' );
    106             if ( ! isset( $l7whv_function ) && class_exists( 'AdminHelpVideoFunctions' ) ){
     104            include_once( 'includes/functions.php' );
     105            if ( ! isset( $l7whv_function ) && class_exists( AdminHelpVideoFunctions ) ){
    107106                $l7whv_function = new AdminHelpVideoFunctions;
    108107            }
    109             include_once( plugin_dir_path( __FILE__ ) . 'templates/help-video-display.php' );
     108            include_once( 'templates/help-video-display.php' );
    110109            wp_die();
    111110        }
     
    220219                    return $post_id;
    221220                }
    222             }
    223             else {
     221            } else {
    224222                if ( ! current_user_can( 'edit_post', $post_id ) ){
    225223                    return $post_id;
     
    278276         */
    279277        public function remove_ex_box(){
    280             remove_meta_box( 'authordiv','post','normal' ); // Author Metabox
    281             remove_meta_box( 'commentstatusdiv','post','normal' ); // Comments Status Metabox
    282             remove_meta_box( 'commentsdiv','post','normal' ); // Comments Metabox
    283             remove_meta_box( 'postcustom','post','normal' ); // Custom Fields Metabox
    284             remove_meta_box( 'postexcerpt','post','normal' ); // Excerpt Metabox
    285             remove_meta_box( 'revisionsdiv','post','normal' ); // Revisions Metabox
    286             remove_meta_box( 'slugdiv','post','normal' ); // Slug Metabox
    287             remove_meta_box( 'trackbacksdiv','post','normal' ); // Trackback Metabox
     278            remove_meta_box( 'authordiv','l7_help_video','normal' ); // Author Metabox
     279            remove_meta_box( 'commentstatusdiv','l7_help_video','normal' ); // Comments Status Metabox
     280            remove_meta_box( 'commentsdiv','l7_help_video','normal' ); // Comments Metabox
     281            remove_meta_box( 'postcustom','l7_help_video','normal' ); // Custom Fields Metabox
     282            remove_meta_box( 'postexcerpt','l7_help_video','normal' ); // Excerpt Metabox
     283            remove_meta_box( 'revisionsdiv','l7_help_video','normal' ); // Revisions Metabox
     284            remove_meta_box( 'slugdiv','l7_help_video','normal' ); // Slug Metabox
     285            remove_meta_box( 'trackbacksdiv','l7_help_video','normal' ); // Trackback Metabox
    288286        }
    289287
  • l7-admin-help-videos/trunk/readme.txt

    r1268060 r1384731  
    55Requires at least: 3.0.1
    66Tested up to: 4.3
    7 Stable tag:1.1.0
     7Stable tag:1.1.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6262== Changelog ==
    6363
    64 = 1.1.0 =
    65 <ul>
    66 <li>Increased query efficiency</li>
    67 </ul>
    68 
    6964= 1.0.9 =
    7065<ul>
    71 <li>Corrected class check</li>
     66<li>Corrected Metabox removal bug</li>
    7267</ul>
    7368
    7469= 1.0.8 =
    7570<ul>
    76 <li>Fixed include bug.</li>
     71<li>Corrected Error Notice</li>
    7772</ul>
    7873
    7974= 1.0.7 =
    8075<ul>
    81 <li>Corrected Error Notice</li>
     76<li>Fixed 'Display All' bug</li>
    8277</ul>
    8378
    8479= 1.0.6 =
    85 <ul>
    86 <li>Fixed 'Display All' bug</li>
    87 </ul>
    88 
    89 = 1.0.5 =
    9080<ul>
    9181<li>Created Custom Taxonomy for the video posts</li>
     
    9484</ul>
    9585
    96 = 1.0.4 =
     86= 1.0.5 =
    9787<ul>
    9888<li>Bug fix</li>
    9989</ul>
    10090
    101 = 1.0.3 =
     91= 1.0.4 =
    10292<ul>
    10393<li> Categories list only the categories with video posts in them.</li>
    10494</ul>
    10595
    106 = 1.0.2 =
     96= 1.0.3 =
    10797<ul>
    10898<li>Default Values added</li>
     
    111101</ul>
    112102
    113 = 1.0.1 =
     103= 1.0.2 =
    114104<ul>
    115105<li>Optimizations</li>
     
    117107</ul>
    118108
    119 = 1.0.0 =
     109= 1.0.1 =
    120110<ul>
    121111<li>Beta</li>
Note: See TracChangeset for help on using the changeset viewer.