url = admin_url( 'admin.php' ); self::$_instance->url = add_query_arg( array( 'page' => 'starterblog' ), self::$_instance->url ); self::$_instance->title = __( 'Starter Blog Options', 'starter-blog' ); add_action( 'admin_menu', array( self::$_instance, 'add_menu' ), 5 ); add_action( 'admin_enqueue_scripts', array( self::$_instance, 'scripts' ) ); add_action( 'starterblog/dashboard/main', array( self::$_instance, 'copy_theme_settings' ), 5 ); add_action( 'starterblog/dashboard/main', array( self::$_instance, 'box_links' ), 10 ); add_action( 'starterblog/dashboard/main', array( self::$_instance, 'pro_modules_box' ), 15 ); add_action( 'starterblog/dashboard/sidebar', array( self::$_instance, 'box_plugins' ), 10 ); add_action( 'starterblog/dashboard/sidebar', array( self::$_instance, 'box_recommend_plugins' ), 20 ); add_action( 'starterblog/dashboard/sidebar', array( self::$_instance, 'box_community' ), 25 ); add_action( 'admin_notices', array( self::$_instance, 'admin_notice' ) ); add_action( 'admin_init', array( self::$_instance, 'admin_init' ) ); // Tabs. add_action( 'starterblog/dashboard/tab/changelog', array( self::$_instance, 'tab_changelog' ) ); } return self::$_instance; } function add_url_args( $args = array() ) { return add_query_arg( $args, self::$_instance->url ); } /** * Add admin notice when active theme. */ function admin_notice() { global $pagenow; if ( is_admin() && ( 'themes.php' == $pagenow ) && isset( $_GET['activated'] ) ) { starterblog_maybe_change_header_version(); ?>
<?php esc_attr_e( 'logo', 'starter-blog' ); ?>
', 'starter-blog' ); ?>

Starter Blog Theme Options page.', 'starter-blog' ), esc_url( admin_url( 'themes.php?page=starterblog' ) ) ); ?>

' . $child_theme->Name . '', '' . esc_html__( 'Starter Blog', 'starter-blog' ). '' ); // phpcs:ignore ?> 'starterblog', 'action' => 'show_copy_settings', ); $copy_link = add_query_arg( $copy_link_args, admin_url( 'themes.php' ) ); ?> %s', esc_html__( 'Now you can copy setting data from parent theme to this child theme', 'starter-blog' ), esc_url( $copy_link ), esc_html__( 'Copy Settings', 'starter-blog' ) ); ?>

 

title, $this->title, 'manage_options', 'starterblog', array( $this, 'page' ) ); } /** * Register scripts * * @param string $id */ function scripts( $id ) { if ( 'appearance_page_starterblog' != $id && 'themes.php' != $id ) { return; } $suffix = StarterBlog()->get_asset_suffix(); wp_enqueue_style( 'starterblog-admin', esc_url( get_template_directory_uri() ) . '/assets/css/admin/dashboard' . $suffix . '.css', false, StarterBlog::$version ); if ( 'themes' != $id ) { wp_enqueue_style( 'plugin-install' ); wp_enqueue_script( 'plugin-install' ); wp_enqueue_script( 'updates' ); add_thickbox(); } } function setup() { $theme = wp_get_theme(); if ( is_child_theme() ) { $theme = $theme->parent(); } $this->config = array( 'name' => $theme->get( 'Name' ), 'theme_uri' => $theme->get( 'ThemeURI' ), 'desc' => $theme->get( 'Description' ), 'author' => $theme->get( 'Author' ), 'author_uri' => $theme->get( 'AuthorURI' ), 'version' => $theme->get( 'Version' ), ); $this->current_tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : ''; // phpcs:ignore } function page() { $this->setup(); $this->page_header(); echo '
'; $cb = apply_filters( 'starterblog/dashboard/content_cb', false ); if ( ! is_callable( $cb ) ) { $cb = array( $this, 'page_inner' ); } if ( is_callable( $cb ) ) { call_user_func_array( $cb, array( $this ) ); } echo '
'; } public function page_header() { ?>
<?php esc_attr_e( 'logo', 'starter-blog' ); ?> config['version'] ); ?>
get_contents( $file ); } ?>

1 ), $url ); wp_redirect( $url ); die(); } } } function copy_theme_settings() { if ( is_child_theme() && isset( $_GET['action'] ) && 'show_copy_settings' == $_GET['action'] ) { $child_theme = wp_get_theme(); $current_action_link = admin_url( 'themes.php?page=starterblog' ); ?>

Name ); // phpcs:ignore ?>

'; $select .= ''; $select .= ''; $select .= ''; // phpcs:ignore $select .= ''; $select_2 = ''; echo sprintf( '%1$s %2$s %3$s', $select, esc_html__( 'To', 'starter-blog' ), $select_2 ); ?>
__( 'Logo & Site Identity', 'starter-blog' ), 'url' => add_query_arg( array( 'autofocus' => array( 'section' => 'title_tagline' ) ), $url ), ), array( 'label' => __( 'Layout Settings', 'starter-blog' ), 'url' => add_query_arg( array( 'autofocus' => array( 'section' => 'global_layout_section' ) ), $url ), ), array( 'label' => __( 'Header Builder', 'starter-blog' ), 'url' => add_query_arg( array( 'autofocus' => array( 'panel' => 'header_settings' ) ), $url ), ), array( 'label' => __( 'Footer Builder', 'starter-blog' ), 'url' => add_query_arg( array( 'autofocus' => array( 'panel' => 'footer_settings' ) ), $url ), ), array( 'label' => __( 'Styling', 'starter-blog' ), 'url' => add_query_arg( array( 'autofocus' => array( 'panel' => 'styling_panel' ) ), $url ), ), array( 'label' => __( 'Typography', 'starter-blog' ), 'url' => add_query_arg( array( 'autofocus' => array( 'panel' => 'typography_panel' ) ), $url ), ), array( 'label' => __( 'Sidebar Settings', 'starter-blog' ), 'url' => add_query_arg( array( 'autofocus' => array( 'section' => 'sidebar_layout_section' ) ), $url ), ), array( 'label' => __( 'Titlebar Settings', 'starter-blog' ), 'url' => add_query_arg( array( 'autofocus' => array( 'section' => 'titlebar' ) ), $url ), ), array( 'label' => __( 'Blog Posts', 'starter-blog' ), 'url' => add_query_arg( array( 'autofocus' => array( 'panel' => 'blog_panel' ) ), $url ), ), array( 'label' => __( 'Homepage Settings', 'starter-blog' ), 'url' => add_query_arg( array( 'autofocus' => array( 'section' => 'static_front_page' ) ), $url ), ), ); $links = apply_filters( 'starterblog/dashboard/links', $links ); ?>

Starter Templates is a free add-on for the Starter Blog theme which help you browse and import ready made websites with few clicks.', 'starter-blog' ); ?>

'starter-templates', 'active_filename' => 'starter-templates/starter-templates.php', ); $plugin_info = wp_parse_args( $plugin_info, array( 'name' => '', 'active_filename' => '', ) ); $status = is_dir( WP_PLUGIN_DIR . '/' . $plugin_slug ); $button_class = 'install-now button'; if ( $plugin_info['active_filename'] ) { $active_file_name = $plugin_info['active_filename']; } else { $active_file_name = $plugin_slug . '/' . $plugin_slug . '.php'; } $sites_url = add_query_arg( array( 'page' => 'starter-templates', ), admin_url( 'themes.php' ) ); $view_site_txt = __( 'View Site Library', 'starter-blog' ); if ( ! is_plugin_active( $active_file_name ) ) { $button_txt = esc_html__( 'Install Now', 'starter-blog' ); if ( ! $status ) { $install_url = wp_nonce_url( add_query_arg( array( 'action' => 'install-plugin', 'plugin' => $plugin_slug, ), network_admin_url( 'update.php' ) ), 'install-plugin_' . $plugin_slug ); } else { $install_url = add_query_arg( array( 'action' => 'activate', 'plugin' => rawurlencode( $active_file_name ), 'plugin_status' => 'all', 'paged' => '1', '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $active_file_name ), ), network_admin_url( 'plugins.php' ) ); $button_class = 'activate-now button-primary'; $button_txt = esc_html__( 'Active Now', 'starter-blog' ); } $detail_link = add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => $plugin_slug, 'TB_iframe' => 'true', 'width' => '772', 'height' => '349', ), network_admin_url( 'plugin-install.php' ) ); echo '
'; echo '

' . $button_txt . '

'; // WPCS: XSS OK. echo '' . esc_html__( 'Details', 'starter-blog' ) . ''; echo '
'; } else { echo '
'; echo '

' . $view_site_txt . '

'; // // WPCS: XSS OK. echo '
'; } ?>
$info ) { if ( strpos( $plugin_file, $plugin_slug . '/' ) === 0 ) { return $plugin_file; } } return false; } function get_first_tag( $content ) { $content = wp_kses( $content, array( 'a' => array( 'href' => array(), 'title' => array(), ), 'br' => array(), 'p' => array(), 'em' => array(), 'strong' => array(), ) ); $content = substr( $content, 0, strpos( $content, '

' ) + 4 ); return $content; } function box_recommend_plugins() { $list_plugins = array( 'elementor', 'beaver-builder-lite-version', 'fluentform', ); $list_plugins = apply_filters( 'starterblog/recommend-plugins', $list_plugins ); $key = 'starterblog_plugins_info_' . wp_hash( json_encode( $list_plugins ) ); // phpcs:ignore $plugins_info = get_transient( $key ); if ( false === $plugins_info ) { $plugins_info = array(); if ( ! function_exists( 'plugins_api' ) ) { require_once ABSPATH . '/wp-admin/includes/plugin-install.php'; } foreach ( $list_plugins as $slug ) { $info = plugins_api( 'plugin_information', array( 'slug' => $slug ) ); if ( ! is_wp_error( $info ) ) { $plugins_info[ $slug ] = $info; } } set_transient( $key, $plugins_info ); } $html = ''; foreach ( $plugins_info as $plugin_slug => $info ) { $status = is_dir( WP_PLUGIN_DIR . '/' . $plugin_slug ); $plugin_file = $this->get_plugin_file( $plugin_slug ); if ( ! is_plugin_active( $plugin_file ) ) { $html .= '
'; $html .= '

' . esc_html( $info->name ) . '

'; if ( $status ) { $button_class = 'activate-now'; $button_txt = esc_html__( 'Activate', 'starter-blog' ); $url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ); // phpcs:ignore } else { $button_class = 'install-now'; $button_txt = esc_html__( 'Install Now', 'starter-blog' ); $url = wp_nonce_url( add_query_arg( array( 'action' => 'install-plugin', 'plugin' => $plugin_slug, ), network_admin_url( 'update.php' ) ), 'install-plugin_' . $plugin_slug ); } $detail_link = add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => $plugin_slug, 'TB_iframe' => 'true', 'width' => '772', 'height' => '349', ), network_admin_url( 'plugin-install.php' ) ); $class = 'action-btn plugin-card-' . $plugin_slug; $html .= '
'; $html .= '

' . $button_txt . '

'; $html .= '' . esc_html__( 'Details', 'starter-blog' ) . ''; $html .= '
'; $html .= '
'; } } // end foreach if ( $html ) { ?>
__( 'Header Transparent', 'starter-blog' ), 'desc' => __( 'Make your website stand out with transparent header modules.', 'starter-blog' ), 'url' => 'https://fancywp.com/docs/starter-blog/starterblog-pro-modules/header-transparent/', ), array( 'name' => __( 'Header Sticky', 'starter-blog' ), 'desc' => __( 'Let your header accessible when users scroll up or down in unique style.', 'starter-blog' ), 'url' => 'https://fancywp.com/docs/starter-blog/starterblog-pro-modules/header-sticky/', ), array( 'name' => __( 'Header and Footer Builder Booster', 'starter-blog' ), 'desc' => __( 'Get more header and footer builder items, plus advanced styling options.', 'starter-blog' ), 'url' => 'https://fancywp.com/docs/starter-blog/starterblog-pro-modules/advanced-header-footer-builder/', ), array( 'name' => __( 'Scroll To Top', 'starter-blog' ), 'desc' => __( 'Get a better user experience with a scroll to top button with beautiful animation.', 'starter-blog' ), 'url' => 'https://fancywp.com/docs/starter-blog/starterblog-pro-modules/scroll-to-top/', ), array( 'name' => __( 'Blog Pro', 'starter-blog' ), 'desc' => __( 'Take advantage of the Blog Pro module to show off your posts in any layouts.', 'starter-blog' ), 'url' => 'https://fancywp.com/docs/starter-blog/starterblog-pro-modules/blog-pro/', ), array( 'name' => __( 'Advanced Styling', 'starter-blog' ), 'desc' => __( 'Control the layout and typography setting for page header title, page header cover and more.', 'starter-blog' ), 'url' => 'https://fancywp.com/docs/starter-blog/starterblog-pro-modules/advanced-styling/', ), array( 'name' => __( 'Portfolio', 'starter-blog' ), 'desc' => __( 'Show off your best project in a beautiful way.', 'starter-blog' ), 'url' => 'https://fancywp.com/docs/starter-blog/starterblog-pro-modules/portfolio/', ), array( 'name' => __( 'Multiple Headers', 'starter-blog' ), 'desc' => __( 'Create unique header for each page, post, archive or WooCommerce pages.', 'starter-blog' ), 'url' => 'https://fancywp.com/docs/starter-blog/starterblog-pro-modules/multiple-headers/', ), array( 'name' => __( 'Mega Menu', 'starter-blog' ), 'desc' => __( 'Create mega menu for your sites that need more space for navigation.', 'starter-blog' ), 'url' => 'https://fancywp.com/docs/starter-blog/starterblog-pro-modules/mega-menu/', ), array( 'name' => __( 'Multilingual Integration', 'starter-blog' ), 'desc' => __( 'WPML multilingual plugin support, plus a fully customized language switcher header builder item.', 'starter-blog' ), 'url' => '', ), array( 'name' => __( 'Custom Fonts', 'starter-blog' ), 'desc' => __( 'Custom Fonts module allows you to add your self-hosted fonts and use them on your Starter Blog powered websites.', 'starter-blog' ), 'url' => '', ), array( 'name' => __( 'Typekit', 'starter-blog' ), 'desc' => __( 'Typekit module allows you to add Typekit fonts and use them on your Starter Blog powered websites.', 'starter-blog' ), 'url' => '', ), array( 'name' => __( 'Starter Blog Custom Hooks', 'starter-blog' ), 'desc' => __( 'Add custom hook scripts.', 'starter-blog' ), 'url' => '', ), array( 'name' => __( 'WooCommerce Booster', 'starter-blog' ), 'desc' => __( 'Gives you creative control of style and layout options for your shop.', 'starter-blog' ), 'url' => '', ), array( 'name' => __( 'Single Product Layouts', 'starter-blog' ), 'desc' => __( 'More beautiful layouts for your single product.', 'starter-blog' ), 'url' => '', 'sub' => true, ), array( 'name' => __( 'Off Canvas Filter', 'starter-blog' ), 'desc' => __( 'Add off canvas products filter for shop and product archive pages.', 'starter-blog' ), 'url' => '', 'sub' => true, ), array( 'name' => __( 'Product Gallery Slider', 'starter-blog' ), 'desc' => __( 'Add slider for product gallery.', 'starter-blog' ), 'url' => '', 'sub' => true, ), array( 'name' => __( 'Quick View', 'starter-blog' ), 'desc' => __( 'Add product quick view modal for product listing..', 'starter-blog' ), 'url' => '', 'sub' => true, ), array( 'name' => __( 'Infinity Scroll.', 'starter-blog' ), 'desc' => __( 'Loads the next posts, products automatically when the reader approaches the bottom of the page.', 'starter-blog' ), 'url' => '', ), ); ?>

current_tab && has_action( 'starterblog/dashboard/tab/' . $this->current_tab ) ) { do_action( 'starterblog/dashboard/tab/' . $this->current_tab, $this ); } else { ?>