💥 TRENDING: Changeset/ - Uncensored 2025

Changeset 2371654


Ignore:
Timestamp:
08/29/2020 06:34:53 PM (5 years ago)
Author:
downstairsdev
Message:

Version 1.0.1

Location:
portfolio-post-type
Files:
113 added
4 edited

Legend:

Unmodified
Added
Removed
  • portfolio-post-type/trunk/includes/class-gamajo-dashboard-glancer.php

    r1988321 r2371654  
    8383     * @return array Filtered "At a Glance" items.
    8484     */
    85     public function show( array $items ) {
     85    public function show( $items ) {
    8686        foreach ( $this->items as $item ) {
    8787            $item_markup = $this->get_single_item( $item );
  • portfolio-post-type/trunk/includes/class-portfolio-post-type-admin.php

    r1988321 r2371654  
    4949
    5050        // Show post counts in the dashboard
    51         add_action( 'right_now_content_table_end', array( $this, 'add_rightnow_counts' ) );
    5251        add_filter( 'dashboard_glance_items', array( $this, 'add_glance_counts' ), 10, 1 );
     52       
     53        // Adds portfolio icon to the dashboard "At a Glance"   
     54        add_action( 'admin_head', array( $this, 'add_glance_icon' ) );
    5355    }
    5456
     
    168170     * @since Unknown
    169171     */
    170     public function add_glance_counts( array $items ) {
     172    public function add_glance_counts( $items ) {
    171173        $glancer = new Gamajo_Dashboard_Glancer;
    172174        $glancer->add( $this->registration_handler->post_type, array( 'publish', 'pending' ) );
     
    174176        return $items;
    175177    }
    176 
    177     /**
    178      * Add counts to "Right Now" dashboard widget in WP 3.7-.
    179      *
    180      * @since Unknown
    181      */
    182     public function add_rightnow_counts() {
    183         $glancer = new Gamajo_Dashboard_RightNow;
    184         $glancer->add( $this->registration_handler->post_type, array( 'publish', 'pending' ) );
     178   
     179    /**
     180    * Displays the portfolio icon in the glance view in the dashboard.
     181    */ 
     182    public function add_glance_icon() {
     183            // Styling only needed on dashboard page.
     184            $screen = get_current_screen();
     185            if ( ! is_object( $screen ) || $screen->id !== 'dashboard' ) { 
     186                return;
     187            }   
     188            ?> 
     189            <style>
     190                #dashboard_right_now .portfolio-count:before { 
     191                    content: "\f322";   
     192                }   
     193            </style>   
     194            <?php
    185195    }
    186196
  • portfolio-post-type/trunk/portfolio-post-type.php

    r1988321 r2371654  
    1313 * Plugin URI:  https://wptheming.com/portfolio-post-type/
    1414 * Description: Enables a portfolio post type and taxonomies.
    15  * Version:     1.0.0
     15 * Version:     1.0.1
    1616 * Author:      Devin Price
    1717 * Author URI:  https://www.wptheming.com/
  • portfolio-post-type/trunk/readme.txt

    r1988321 r2371654  
    22Contributors: downstairsdev, GaryJ
    33Tags: portfolio, post type
    4 Requires at least: 3.7
    5 Tested up to: 5.0.0
    6 Stable tag: 1.0.0
     4Requires at least: 3.8
     5Tested up to: 5.5
     6Stable tag: 1.0.1
    77License: GPLv2 or later
    88
     
    3232
    3333== Changelog ==
     34
     35= 1.0.1 =
     36
     37* Update: Show portfolio icon in dashboard glance. Removed by mistake in v1.0.0, props @chesio for bug report.
     38* Update: Fix for PHP 7.4.9 notices
    3439
    3540= 1.0.0 =
Note: See TracChangeset for help on using the changeset viewer.