Plugin Directory

Changeset 2650675

Timestamp:
12/29/2021 11:21:08 PM (3 years ago)
Author:
husobj
Message:

Version 1.4.1

Location:
page-parts/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • page-parts/trunk/CHANGELOG.md

    r2650217 r2650675  
    44
    55## [Unreleased]
     6
     7
     8
     9
     10
    611
    712## [1.4] - 2021-12-28
     
    130135- First public release.
    131136
    132 [Unreleased]: https://github.com/benhuson/page-parts/compare/1.4...HEAD
     137[Unreleased]: https://github.com/benhuson/page-parts/compare/1.4.1...HEAD
     138[1.4.1]: https://github.com/benhuson/page-parts/compare/1.4...1.4.1
    133139[1.4]: https://github.com/benhuson/page-parts/compare/1.3.1...1.4
    134140[1.3]: https://github.com/benhuson/page-parts/compare/1.3...1.3.1
  • page-parts/trunk/admin/admin.php

    r1867935 r2650675  
    1313        add_action( 'save_post', array( $this, 'save_page_parts' ) );
    1414        add_filter( 'http_request_args', array( $this, 'http_request_args' ), 5, 2 );
    15         add_action( 'contextual_help', array( $this, 'contextual_help' ), 10, 3 );
     15        add_action( 'load-post.php', array( $this, 'add_help_tabs' ) );
     16        add_action( 'load-edit.php', array( $this, 'add_help_tabs' ) );
    1617        add_filter( 'manage_edit-page-part_columns', array( $this, 'manage_edit_page_part_columns' ) );
    1718        add_action( 'manage_posts_custom_column', array( $this, 'manage_posts_custom_column' ), 10, 2 );
     
    347348
    348349    /**
    349      * Contextual Help
    350      *
    351      * @param   string  $contextual_help  Contextual help HTML.
    352      * @param   string  $screen_id        Screen ID.
    353      * @param   object  $screen           Screen object.
    354      * @return  string                    HTML output.
    355      */
    356     public function contextual_help( $contextual_help, $screen_id, $screen ) {
    357 
    358         //$contextual_help .= var_dump( $screen ); // use this to help determine $screen->id
     350     * Add Help Tabs
     351     *
     352     * @internal  Private. Called via the `load-{page}` action.
     353     */
     354    public function add_help_tabs() {
     355
     356        $screen = get_current_screen();
    359357
    360358        if ( 'page-part' == $screen->id ) {
    361359
    362360            // Edit Page Part
    363             $contextual_help =
    364                 '<p>' . __( 'By default you can only associate a new page part with a page.', 'page-parts' ) . '</p>' .
    365                 '<p>' . __( 'If additional post types are supported you must create the new page part by editing the post. Once a page part is associated with a page (or post type) the "Parent Page" panel with allow you to change the parent via a dropdown menu for hierarchical post types. There is not yet the option to re-associate a page part with a different parent for non-hierarchical post types.', 'page-parts' ) . '</p>';
     361            $screen->add_help_tab( array(
     362                'id'      => 'page_parts_help_tab',
     363                'title'   => __( 'Page Part', 'page-parts' ),
     364                'content' => '<p>' . __( 'By default you can only associate a new page part with a page.', 'page-parts' ) . '</p>'
     365                    . '<p>' . __( 'If additional post types are supported you must create the new page part by editing the post. Once a page part is associated with a page (or post type) the "Parent Page" panel with allow you to change the parent via a dropdown menu for hierarchical post types. There is not yet the option to re-associate a page part with a different parent for non-hierarchical post types.', 'page-parts' ) . '</p>',
     366            ) );
    366367
    367368        } elseif ( 'edit-page-part' == $screen->id ) {
    368369
    369370            // Page Parts Admin Table
    370             $contextual_help = '<p>' . __( 'Page parts allow you to add extra content relating to a page.', 'page-parts' ) . '</p>'
    371                 . '<p>' . __( 'Click on a page part parent to edit the associated page and view that page\'s other page parts.', 'page-parts' ) . '</p>';
    372 
    373         }
    374 
    375         return $contextual_help;
     371            $screen->add_help_tab( array(
     372                'id'      => 'page_part_help_tab',
     373                'title'   => __( 'Page Parts', 'page-parts' ),
     374                'content' => '<p>' . __( 'Page parts allow you to add extra content relating to a page.', 'page-parts' ) . '</p>'
     375                    . '<p>' . __( 'Click on a page part parent to edit the associated page and view that page\'s other page parts.', 'page-parts' ) . '</p>',
     376            ) );
     377
     378        }
    376379
    377380    }
  • page-parts/trunk/page-parts.php

    r2650219 r2650675  
    55Plugin URI: https://github.com/benhuson/page-parts
    66Description: Manage subsections of a page.
    7 Version: 1.4
     7Version: 1.4
    88Author: Ben Huson
    99Author URI: https://github.com/benhuson
     
    1111*/
    1212
    13 define( 'PAGE_PARTS_VERSION', '1.4' );
     13define( 'PAGE_PARTS_VERSION', '1.4' );
    1414define( 'PAGE_PARTS_FILE', __FILE__ );
    1515
  • page-parts/trunk/readme.txt

    r2650217 r2650675  
    44Requires at least: 3.9
    55Tested up to: 5.8.2
    6 Stable tag: 1.4
     6Stable tag: 1.4
    77License: GPL2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3838
    3939= Unreleased =
     40
     41
     42
     43
     44
    4045
    4146= 1.4 =
Note: See TracChangeset for help on using the changeset viewer.