當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WP_Customize_Manager::theme方法代碼示例

本文整理匯總了PHP中WP_Customize_Manager::theme方法的典型用法代碼示例。如果您正苦於以下問題:PHP WP_Customize_Manager::theme方法的具體用法?PHP WP_Customize_Manager::theme怎麽用?PHP WP_Customize_Manager::theme使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WP_Customize_Manager的用法示例。


在下文中一共展示了WP_Customize_Manager::theme方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

	function do_customize_boot_actions() {
		$_SERVER['REQUEST_METHOD'] = 'POST';
		do_action( 'setup_theme' );
		$_REQUEST['nonce'] = wp_create_nonce( 'preview-customize_' . $this->manager->theme()->get_stylesheet() );
		do_action( 'after_setup_theme' );
		do_action( 'init' );
		do_action( 'wp_loaded' );
		do_action( 'wp', $GLOBALS['wp'] );
	}
開發者ID:staylor,項目名稱:develop.svn.wordpress.org,代碼行數:9,代碼來源:widgets.php

示例2:

 /**
  * Set the current user to be an admin, add the preview nonce, and set the query var.
  */
 function setup_valid_render_partials_request_environment()
 {
     wp_set_current_user(self::factory()->user->create(array('role' => 'administrator')));
     $_REQUEST['nonce'] = wp_create_nonce('preview-customize_' . $this->wp_customize->theme()->get_stylesheet());
     $_POST[WP_Customize_Selective_Refresh::RENDER_QUERY_VAR] = '1';
     $this->do_customize_boot_actions();
 }
開發者ID:ntwb,項目名稱:wordpress-travis,代碼行數:10,代碼來源:selective-refresh-ajax.php

示例3: hooks_theme_customizer_modified

 public function hooks_theme_customizer_modified(WP_Customize_Manager $obj)
 {
     $aal_args = array('action' => 'updated', 'object_type' => 'Theme', 'object_subtype' => $obj->theme()->display('Name'), 'object_id' => 0, 'object_name' => 'Theme Customizer');
     if ('customize_preview_init' === current_filter()) {
         $aal_args['action'] = 'accessed';
     }
     aal_insert_log($aal_args);
 }
開發者ID:klebercarvalho,項目名稱:demo,代碼行數:8,代碼來源:class-aal-hook-theme.php

示例4: theme_customizer_modified

 /**
  * Theme modified
  *
  * @since 0.1.0
  *
  * @param WP_Customize_Manager $obj
  */
 public function theme_customizer_modified(WP_Customize_Manager $obj)
 {
     $args = array('object_type' => $this->object_type, 'object_subtype' => $obj->theme()->display('Name'), 'object_name' => esc_html__('Theme Customizer', 'wp-user-activity'), 'object_id' => 0, 'action' => 'customize');
     // Accessed the customizer
     if ('customize_preview_init' === current_filter()) {
         $args['action'] = 'read';
     }
     wp_insert_user_activity($args);
 }
開發者ID:wir,項目名稱:wp-user-activity,代碼行數:16,代碼來源:class-action-themes.php


注:本文中的WP_Customize_Manager::theme方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。