Changeset 4024 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-theme-directory/inc/class-plugin.php
- Timestamp:
- 09/09/2016 07:47:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-theme-directory/inc/class-plugin.php
r3057 r4024 13 13 14 14 /** 15 * 16 * @var Sync\Translation_Sync 15 * Parent project for themes. 17 16 */ 18 public $translation_sync = null;17 const GP_MASTER_PROJECT = 'wp-themes'; 19 18 20 19 /** … … 42 41 public function plugins_loaded() { 43 42 add_action( 'wporg_translate_import_or_update_theme', array( $this, 'import_or_update_theme_on_status_change' ) ); 43 44 $language_pack_build_trigger = new Language_Pack\Build_Trigger(); 45 $language_pack_build_trigger->register_events(); 46 47 $language_pack_build_listener = new Language_Pack\Build_Listener( 48 Language_Pack\Build_Trigger::HOOK 49 ); 50 $language_pack_build_listener->register_events(); 44 51 45 52 if ( defined( 'WP_CLI' ) && WP_CLI ) { … … 94 101 95 102 /** 103 * Returns whether a project path belongs to the themes project. 104 * 105 * @param string $path Path of a project. 106 * 107 * @return bool True if it's a theme, false if not. 108 */ 109 public static function project_is_theme( $path ) { 110 if ( empty( $path ) ) { 111 return false; 112 } 113 114 $path = '/' . trim( $path, '/' ) . '/'; 115 if ( false === strpos( $path, '/' . self::GP_MASTER_PROJECT . '/' ) ) { 116 return false; 117 } 118 119 return true; 120 } 121 122 /** 96 123 * Sends a notifcation to the the Slack channel. 97 124 *
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)