| @@ -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, |