PHP 클래스 Envato_Theme_Setup_Wizard

파일 보기 프로젝트 열기: dtbaker/envato-wp-theme-setup-wizard 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$errors
$logs
$site_styles

보호된 프로퍼티들

프로퍼티 타입 설명
$envato_username Theme author username, used in check for oauth.
$oauth_script Full url to server-script.php (available from https://gist.github.com/dtbaker )
$page_parent string The slug name for the parent menu
$page_slug string The slug name to refer to this menu
$page_url string Complete URL to Setup Wizard
$plugin_path string Relative plugin path
$plugin_url string Relative plugin url for this plugin folder, used when enquing scripts
$step Current Step
$steps Steps for the setup wizard
$tgmpa_instance object TGMPA instance storage
$tgmpa_menu_slug string TGMPA Menu slug
$tgmpa_url string TGMPA Menu url
$theme_name Current theme name, used as namespace in actions.
$version string The class version number.

공개 메소드들

메소드 설명
__construct ( ) A dummy constructor to prevent this class from being loaded more than once.
_content_install_settings ( )
_get_json ( $file )
admin_menus ( ) Add admin menus/screens.
admin_redirects ( )
ajax_content ( )
ajax_plugins ( )
cleanFilePath ( string $path ) Helper function Take a path and return it clean
cmpr_strlen ( $a, $b ) return the difference in length between two strings
elementor_post ( $post_id = false )
enqueue_scripts ( )
envato_market_admin_init ( )
envato_market_http_request_args ( $args, $url ) : mixed
envato_setup_color_style ( )
envato_setup_color_style_save ( ) Save logo & design options
envato_setup_customize ( )
envato_setup_default_content ( ) Page setup
envato_setup_default_plugins ( ) Page setup
envato_setup_help_support ( )
envato_setup_introduction ( ) Introduction step
envato_setup_introduction_save ( ) Handles save button from welcome page. This is to perform tasks when the setup wizard has already been run. E.g. reset defaults
envato_setup_logo_design ( ) Logo & Design
envato_setup_logo_design_save ( ) Save logo & design options
envato_setup_ready ( ) Final step
envato_setup_updates ( ) Payments Step
envato_setup_updates_save ( ) Payments Step save
error ( $message )
filter_options ( $options )
get_default_theme_style ( ) Get the default style. Can be overriden by theme init scripts.
get_header_logo_width ( ) Get the default style. Can be overriden by theme init scripts.
get_instance ( ) : Envato_Theme_Setup_Wizard
get_logo_image ( ) Get the default style. Can be overriden by theme init scripts.
get_next_step_link ( )
get_oauth_login_url ( $return ) we can update the token there.
get_step_link ( $step )
get_tgmpa_instanse ( ) Get configured TGMPA instance
init_actions ( ) Setup the hooks, actions and filters.
init_globals ( ) Setup the class globals.
init_wizard_steps ( ) : array Setup steps.
is_possible_upgrade ( ) We determine if the user already has theme content installed. This can happen if swapping from a previous theme or updated the current theme. We change the UI a bit when updating / swapping to a new theme.
is_submenu_page ( )
log ( $message )
render_oauth_login_description_callback ( )
render_oauth_login_fields_callback ( )
set_tgmpa_url ( ) Update $tgmpa_menu_slug and $tgmpa_parent_slug from TGMPA instance
setup_wizard ( ) Show the setup wizard
setup_wizard_content ( ) Output the content for the current step
setup_wizard_footer ( ) Setup Wizard Footer
setup_wizard_header ( ) Setup Wizard Header
setup_wizard_steps ( ) Output the steps
switch_theme ( )
tgmpa_load ( $status )
upgrader_post_install ( $return, $theme ) After a theme update we clear the setup_complete option. This prompts the user to visit the update page again.
vc_post ( $post_id = false )

비공개 메소드들

메소드 설명
_array_merge_recursive_distinct ( $array1, $array2 ) : mixed
_cleanup_imported_ids ( )
_content_default_get ( )
_content_install_type ( )
_content_install_widgets ( )
_delay_post_process ( $post_type, $post_data )
_elementor_id_import ( &$item, $key )
_fetch_remote_file ( $url, $post )
_get_plugins ( )
_get_sql ( $file )
_handle_delayed_posts ( $last_delay = false )
_handle_post_orphans ( )
_imported_post_id ( $original_id = false, $new_id = false )
_imported_term_id ( $original_term_id, $new_term_id = false )
_manage_oauth_token ( $token )
_parse_gallery_shortcode_content ( $content )
_post_orphans ( $original_id = false, $missing_parent_id = false )
_process_post_data ( $post_type, $post_data, $delayed, $debug = false )

메소드 상세

__construct() 공개 메소드

A dummy constructor to prevent this class from being loaded more than once.
또한 보기: Envato_Theme_Setup_Wizard::instance()
부터: 1.1.1
public __construct ( )

_content_install_settings() 공개 메소드

_get_json() 공개 메소드

public _get_json ( $file )

admin_menus() 공개 메소드

Add admin menus/screens.
public admin_menus ( )

admin_redirects() 공개 메소드

public admin_redirects ( )

ajax_content() 공개 메소드

public ajax_content ( )

ajax_plugins() 공개 메소드

public ajax_plugins ( )

cleanFilePath() 공개 정적인 메소드

Helper function Take a path and return it clean
부터: 1.1.2
public static cleanFilePath ( string $path )
$path string

cmpr_strlen() 공개 메소드

return the difference in length between two strings
public cmpr_strlen ( $a, $b )

elementor_post() 공개 메소드

public elementor_post ( $post_id = false )

enqueue_scripts() 공개 메소드

public enqueue_scripts ( )

envato_market_admin_init() 공개 메소드

envato_market_http_request_args() 공개 메소드

public envato_market_http_request_args ( $args, $url ) : mixed
$args
$url
리턴 mixed Filter the WordPress HTTP call args. We do this to find any queries that are using an expired token from an oAuth bounce login. Since these oAuth tokens only last 1 hour we have to hit up our server again for a refresh of that token before using it on the Envato API. Hacky, but only way to do it.

envato_setup_color_style() 공개 메소드

envato_setup_color_style_save() 공개 메소드

Save logo & design options

envato_setup_customize() 공개 메소드

envato_setup_default_content() 공개 메소드

Page setup

envato_setup_default_plugins() 공개 메소드

Page setup

envato_setup_help_support() 공개 메소드

envato_setup_introduction() 공개 메소드

Introduction step

envato_setup_introduction_save() 공개 메소드

Handles save button from welcome page. This is to perform tasks when the setup wizard has already been run. E.g. reset defaults
부터: 1.2.5

envato_setup_logo_design() 공개 메소드

Logo & Design

envato_setup_logo_design_save() 공개 메소드

Save logo & design options

envato_setup_ready() 공개 메소드

Final step
public envato_setup_ready ( )

envato_setup_updates() 공개 메소드

Payments Step

envato_setup_updates_save() 공개 메소드

Payments Step save

error() 공개 메소드

public error ( $message )

filter_options() 공개 메소드

public filter_options ( $options )

get_default_theme_style() 공개 메소드

Get the default style. Can be overriden by theme init scripts.
또한 보기: Envato_Theme_Setup_Wizard::instance()
부터: 1.1.7

get_header_logo_width() 공개 메소드

Get the default style. Can be overriden by theme init scripts.
또한 보기: Envato_Theme_Setup_Wizard::instance()
부터: 1.1.9

get_instance() 공개 정적인 메소드

부터: 1.1.3
public static get_instance ( ) : Envato_Theme_Setup_Wizard
리턴 Envato_Theme_Setup_Wizard

get_logo_image() 공개 메소드

Get the default style. Can be overriden by theme init scripts.
또한 보기: Envato_Theme_Setup_Wizard::instance()
부터: 1.1.9
public get_logo_image ( )

get_oauth_login_url() 공개 메소드

we can update the token there.
public get_oauth_login_url ( $return )

get_tgmpa_instanse() 공개 메소드

Get configured TGMPA instance
부터: 1.1.2
public get_tgmpa_instanse ( )

init_actions() 공개 메소드

Setup the hooks, actions and filters.
부터: 1.1.1
public init_actions ( )

init_globals() 공개 메소드

Setup the class globals.
부터: 1.1.1
public init_globals ( )

init_wizard_steps() 공개 메소드

Setup steps.
부터: 1.1.1
public init_wizard_steps ( ) : array
리턴 array

is_possible_upgrade() 공개 메소드

We determine if the user already has theme content installed. This can happen if swapping from a previous theme or updated the current theme. We change the UI a bit when updating / swapping to a new theme.
부터: 1.1.8
public is_possible_upgrade ( )

is_submenu_page() 공개 메소드

public is_submenu_page ( )

log() 공개 메소드

public log ( $message )

render_oauth_login_description_callback() 공개 메소드

render_oauth_login_fields_callback() 공개 메소드

set_tgmpa_url() 공개 메소드

Update $tgmpa_menu_slug and $tgmpa_parent_slug from TGMPA instance
부터: 1.1.2
public set_tgmpa_url ( )

setup_wizard() 공개 메소드

Show the setup wizard
public setup_wizard ( )

setup_wizard_content() 공개 메소드

Output the content for the current step

setup_wizard_header() 공개 메소드

Setup Wizard Header
public setup_wizard_header ( )

setup_wizard_steps() 공개 메소드

Output the steps
public setup_wizard_steps ( )

switch_theme() 공개 메소드

public switch_theme ( )

tgmpa_load() 공개 메소드

public tgmpa_load ( $status )

upgrader_post_install() 공개 메소드

After a theme update we clear the setup_complete option. This prompts the user to visit the update page again.
부터: 1.1.8
public upgrader_post_install ( $return, $theme )

vc_post() 공개 메소드

public vc_post ( $post_id = false )

프로퍼티 상세

$envato_username 보호되어 있는 프로퍼티

Theme author username, used in check for oauth.
protected $envato_username

$errors 공개적으로 프로퍼티

public $errors

$logs 공개적으로 프로퍼티

public $logs

$oauth_script 보호되어 있는 프로퍼티

Full url to server-script.php (available from https://gist.github.com/dtbaker )
protected $oauth_script

$page_parent 보호되어 있는 프로퍼티

The slug name for the parent menu
부터: 1.1.2
protected string $page_parent
리턴 string

$page_slug 보호되어 있는 프로퍼티

The slug name to refer to this menu
부터: 1.1.1
protected string $page_slug
리턴 string

$page_url 보호되어 있는 프로퍼티

Complete URL to Setup Wizard
부터: 1.1.2
protected string $page_url
리턴 string

$plugin_path 보호되어 있는 프로퍼티

Relative plugin path
부터: 1.1.2
protected string $plugin_path
리턴 string

$plugin_url 보호되어 있는 프로퍼티

Relative plugin url for this plugin folder, used when enquing scripts
부터: 1.1.2
protected string $plugin_url
리턴 string

$site_styles 공개적으로 프로퍼티

부터: 1.1.8
public $site_styles

$step 보호되어 있는 프로퍼티

Current Step
protected $step

$steps 보호되어 있는 프로퍼티

Steps for the setup wizard
protected $steps

$tgmpa_instance 보호되어 있는 프로퍼티

TGMPA instance storage
protected object $tgmpa_instance
리턴 object

$tgmpa_menu_slug 보호되어 있는 프로퍼티

TGMPA Menu slug
protected string $tgmpa_menu_slug
리턴 string

$tgmpa_url 보호되어 있는 프로퍼티

TGMPA Menu url
protected string $tgmpa_url
리턴 string

$theme_name 보호되어 있는 프로퍼티

Current theme name, used as namespace in actions.
protected $theme_name

$version 보호되어 있는 프로퍼티

The class version number.
부터: 1.1.1
protected string $version
리턴 string