setup() public static method

All custom functionality will be hooked into the "init" action.
public static setup ( )
Esempio n. 1
0
            $output['show-all'] = isset($input['show-all']) && $input['show-all'] ? 1 : 0;
            self::delete_transient();
            return $output;
        }
        /**
         * Removes the quantity setting from the options array.
         *
         * @return void
         */
        public static function switch_theme()
        {
            $option = (array) get_option('featured-content');
            if (isset($option['quantity'])) {
                unset($option['quantity']);
                update_option('featured-content', $option);
            }
        }
        public static function jetpack_update_featured_content_for_split_terms($old_term_id, $new_term_id, $term_taxonomy_id, $taxonomy)
        {
            $featured_content_settings = get_option('featured-content', array());
            // Check to see whether the stored tag ID is the one that's just been split.
            if (isset($featured_content_settings['tag-id']) && $old_term_id == $featured_content_settings['tag-id'] && 'post_tag' == $taxonomy) {
                // We have a match, so we swap out the old tag ID for the new one and resave the option.
                $featured_content_settings['tag-id'] = $new_term_id;
                update_option('featured-content', $featured_content_settings);
            }
        }
    }
    Featured_Content::setup();
}
// end if ( ! class_exists( 'Featured_Content' ) && isset( $GLOBALS['pagenow'] ) && 'plugins.php' !== $GLOBALS['pagenow'] ) {