| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @package FireBox |
| 4 | - * @version 1.1.1 Free | |
| 4 | + * @version 2.0.12 Free | |
| 5 | 5 | * |
| 6 | 6 | * @author FirePlugins <info@fireplugins.com> |
| 7 | 7 | * @link https://www.fireplugins.com |
| 8 | - * @copyright Copyright © 2022 FirePlugins All Rights Reserved | |
| 8 | + * @copyright Copyright © 2023 FirePlugins All Rights Reserved | |
| 9 | 9 | * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | namespace FireBox\Core\Shortcodes; |
| @@ -69,11 +69,13 @@ | ||
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | 71 | * Create a shortcode [fboxLoginForm] to print the WP Login Form |
| 72 | 72 | * |
| 73 | + * @param array $attributes | |
| 74 | + * | |
| 73 | 75 | * @return void |
| 74 | 76 | */ |
| 75 | - public function fboxLoginFormShortcodeHandler($atts) | |
| 77 | + public function fboxLoginFormShortcodeHandler($attributes) | |
| 76 | 78 | { |
| 77 | 79 | if (is_user_logged_in()) |
| 78 | 80 | { |
| 79 | 81 | $factory = new \FPFramework\Base\Factory(); |
| @@ -90,10 +92,10 @@ | ||
| 90 | 92 | $str = '<p>' . fpframework()->_('FPF_HI') . ' ' . esc_attr($name) . ',</p><p><a href="' . wp_logout_url() . '" class="fb-btn fb-btn-primary fb-fullwidth">' . fpframework()->_('FPF_LOG_OUT') . '</a></p>'; |
| 91 | 93 | return $str; |
| 92 | 94 | } |
| 93 | 95 | |
| 94 | - $show_forgot_password_link = isset($atts['show_forgot_link']) && $atts['show_forgot_link']; | |
| 95 | - $redirect = isset($atts['redirect']) ? $atts['redirect'] : (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; | |
| 96 | + $show_forgot_password_link = isset($attributes['show_forgot_link']) && $attributes['show_forgot_link']; | |
| 97 | + $redirect = isset($attributes['redirect']) ? $attributes['redirect'] : (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; | |
| 96 | 98 | |
| 97 | 99 | $args = [ |
| 98 | 100 | 'echo' => false, |
| 99 | 101 | 'remember' => true, |
| @@ -132,13 +134,16 @@ | ||
| 132 | 134 | |
| 133 | 135 | /** |
| 134 | 136 | * Create a shortcode [fboxNavigationMenu] to print the navigation menu |
| 135 | 137 | * |
| 138 | + * @param array $attributes | |
| 139 | + * @param string $content | |
| 140 | + * | |
| 136 | 141 | * @return void |
| 137 | 142 | */ |
| 138 | - public function fboxNavigationMenuShortcodeHandler($atts, $content = null) | |
| 143 | + public function fboxNavigationMenuShortcodeHandler($attributes, $content = null) | |
| 139 | 144 | { |
| 140 | - extract(shortcode_atts( | |
| 145 | + $atts = shortcode_atts( | |
| 141 | 146 | [ |
| 142 | 147 | 'menu' => '', |
| 143 | 148 | 'container' => 'div', |
| 144 | 149 | 'container_class' => '', |
| @@ -153,29 +158,30 @@ | ||
| 153 | 158 | 'link_after' => '', |
| 154 | 159 | 'depth' => 0, |
| 155 | 160 | 'walker' => '', |
| 156 | 161 | 'theme_location' => '' |
| 157 | - ], $atts) | |
| 162 | + ], | |
| 163 | + $attributes, | |
| 164 | + 'fboxNavigationMenu' | |
| 158 | 165 | ); |
| 159 | 166 | |
| 160 | - | |
| 161 | 167 | return wp_nav_menu( |
| 162 | 168 | [ |
| 163 | - 'menu' => $menu, | |
| 164 | - 'container' => $container, | |
| 165 | - 'container_class' => $container_class, | |
| 166 | - 'container_id' => $container_id, | |
| 167 | - 'menu_class' => $menu_class, | |
| 168 | - 'menu_id' => $menu_id, | |
| 169 | + 'menu' => $atts['menu'], | |
| 170 | + 'container' => $atts['container'], | |
| 171 | + 'container_class' => $atts['container_class'], | |
| 172 | + 'container_id' => $atts['container_id'], | |
| 173 | + 'menu_class' => $atts['menu_class'], | |
| 174 | + 'menu_id' => $atts['menu_id'], | |
| 169 | 175 | 'echo' => false, |
| 170 | - 'fallback_cb' => $fallback_cb, | |
| 171 | - 'before' => $before, | |
| 172 | - 'after' => $after, | |
| 173 | - 'link_before' => $link_before, | |
| 174 | - 'link_after' => $link_after, | |
| 175 | - 'depth' => $depth, | |
| 176 | - 'walker' => $walker, | |
| 177 | - 'theme_location' => $theme_location | |
| 176 | + 'fallback_cb' => $atts['fallback_cb'], | |
| 177 | + 'before' => $atts['before'], | |
| 178 | + 'after' => $atts['after'], | |
| 179 | + 'link_before' => $atts['link_before'], | |
| 180 | + 'link_after' => $atts['link_after'], | |
| 181 | + 'depth' => $atts['depth'], | |
| 182 | + 'walker' => $atts['walker'], | |
| 183 | + 'theme_location' => $atts['theme_location'] | |
| 178 | 184 | ] |
| 179 | 185 | ); |
| 180 | 186 | } |
| 181 | 187 | } |