WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#28928 closed defect (bug) (fixed)

Twenty Fourteen: get_sticky_posts() doesn't uses $settings in inc/featured-content.php

Reported by: michalzuber Owned by: SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.9
Component: Bundled Theme Keywords: has-patch commit
Focuses: template Cc:

Description

The $settings variable isn't used.

    /**
     * Return an array with IDs of posts maked as sticky.
     *
     * @static
     * @access public
     * @since Twenty Fourteen 1.0
     *
     * @return array Array of sticky posts.
     */
    public static function get_sticky_posts() {
        $settings = self::get_setting();
        return array_slice( get_option( 'sticky_posts', array() ), 0, self::$max_posts );
    }

Attachments (1)

28928.patch (542 bytes) - added by michalzuber 5 years ago.

Download all attachments as: .zip

Change History (6)

@michalzuber
5 years ago

#1 @michalzuber
5 years ago

  • Keywords has-patch added

#2 @DrewAPicture
5 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 4.0

Unused since [27120].

#3 @obenland
5 years ago

  • Component changed from Themes to Bundled Theme

Looks good.

#4 @SergeyBiryukov
5 years ago

  • Summary changed from get_sticky_posts() doesn't uses $settings in twentyfourteen/inc/featured-content.php to Twenty Fourteen: get_sticky_posts() doesn't uses $settings in inc/featured-content.php

#5 @SergeyBiryukov
5 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 29210:

Twenty Fourteen: Remove unused variable after [27120].

props michalzuber.
fixes #28928.

Note: See TracTickets for help on using tickets.