PluginProbe
WebberZone Top 10 — Popular Posts / 4.5.1
WebberZone Top 10 — Popular Posts v4.5.1
4.5.1 4.5.0 4.4.3 4.4.2 4.4.1 4.4.0 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 trunk 1.0 1.0.1 1.1 1.2 1.3 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.6 1.6.1 All 117 releases
← All changes | includes/frontend/class-shortcodes.php +4 -4 4.3.24.5.1 View file →
@@ -37,10 +37,8 @@
37 37 * @param string $content Content.
38 38 * @return string Formatted list of posts generated by tptn_pop_posts
39 39 */
40 40 public static function tptn_list( $atts, $content = null ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed
41 - global $tptn_settings;
42 -
43 41 $wp_query_args = \WebberZone\Top_Ten\Util\Helpers::get_wp_query_arguments();
44 42
45 43 $default_atts = array(
46 44 'heading' => 1,
@@ -54,16 +52,18 @@
54 52 /**
55 53 * Filter the default shortcode attributes.
56 54 *
57 55 * @since 4.0.0
56 + * @since 4.5.0 Added the `$atts` parameter.
58 57 *
59 58 * @param array $default_atts Default shortcode attributes.
59 + * @param array $atts Shortcode attributes.
60 60 */
61 - $default_atts = apply_filters( 'tptn_shortcode_defaults', $default_atts );
61 + $default_atts = apply_filters( 'tptn_shortcode_defaults', $default_atts, $atts );
62 62
63 63 $atts = shortcode_atts(
64 64 array_merge(
65 - $tptn_settings,
65 + \tptn_get_settings_with_defaults(),
66 66 $wp_query_args,
67 67 $default_atts
68 68 ),
69 69 $atts,