PluginProbe
Sharing Image / 3.7
Sharing Image v3.7
3.10 trunk 2.0 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.0.16 2.0.17 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 3.0 3.1 3.2 3.3 All 29 releases
← All changes | classes/class-settings.php +5 -6 3.03.7 View file →
@@ -47,10 +47,9 @@
47 47 /**
48 48 * Init class actions and filters.
49 49 */
50 50 public static function init() {
51 - self::init_tabs();
52 -
51 + add_action( 'admin_init', array( __CLASS__, 'init_tabs' ) );
53 52 add_action( 'admin_menu', array( __CLASS__, 'add_menu' ) );
54 53 add_action( 'admin_title', array( __CLASS__, 'update_settings_title' ) );
55 54 add_action( 'admin_init', array( __CLASS__, 'allow_custom_fonts' ) );
56 55
@@ -257,9 +256,9 @@
257 256 }
258 257
259 258 $tab = self::get_current_tab();
260 259
261 - if ( null === $tab ) {
260 + if ( is_null( $tab ) ) {
262 261 return $title;
263 262 }
264 263
265 264 if ( empty( self::$tabs[ $tab ]['label'] ) ) {
@@ -311,9 +310,9 @@
311 310 */
312 311 private static function show_settings_section() {
313 312 $tab = self::get_current_tab();
314 313
315 - if ( null === $tab ) {
314 + if ( is_null( $tab ) ) {
316 315 return;
317 316 }
318 317
319 318 include_once SHARING_IMAGE_DIR . "templates/{$tab}.php";
@@ -381,9 +380,9 @@
381 380
382 381 /**
383 382 * Set list of settings page tabs.
384 383 */
385 - private static function init_tabs() {
384 + public static function init_tabs() {
386 385 $tabs = array(
387 386 'templates' => array(
388 387 'label' => __( 'Templates', 'sharing-image' ),
389 388 'link' => admin_url( 'options-general.php?page=' . self::SETTINGS_SLUG ),
@@ -425,9 +424,9 @@
425 424 if ( $current === $tab ) {
426 425 $classes[] = 'active';
427 426 }
428 427
429 - if ( null === $current && ! empty( $args['default'] ) ) {
428 + if ( is_null( $current ) && ! empty( $args['default'] ) ) {
430 429 $classes[] = 'active';
431 430 }
432 431
433 432 printf(