Changeset 1651096
- Timestamp:
- 05/04/2017 03:12:04 PM (9 years ago)
- Location:
- botamp/trunk
- Files:
-
- 9 edited
-
admin/class-botamp-admin.php (modified) (2 diffs)
-
admin/partials/botamp-admin-display.php (modified) (1 diff)
-
botamp.php (modified) (3 diffs)
-
includes/class-botamp-activator.php (modified) (3 diffs)
-
includes/class-botamp-deactivator.php (modified) (3 diffs)
-
includes/class-botamp-i18n.php (modified) (3 diffs)
-
includes/class-botamp-loader.php (modified) (8 diffs)
-
includes/class-botamp.php (modified) (14 diffs)
-
public/partials/botamp-public-display.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
botamp/trunk/admin/class-botamp-admin.php
r1620274 r1651096 17 17 18 18 public function __construct( $plugin_name, $version ) { 19 global $wp_post_types; 20 19 21 $this->plugin_name = $plugin_name; 20 22 $this->version = $version; 21 $this->post_types = get_post_types( '', 'objects');23 $this->post_types = $this->get_post_types(); 22 24 23 25 global $wpdb; … … 366 368 $me_proxy->get(); 367 369 } 370 371 private function get_post_types() { 372 $post_types = get_post_types( '', 'objects'); 373 374 if( !in_array( 'product', array_map(function($post_type) { return $post_type->name; }, $post_types ) ) 375 && in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { 376 377 $product_post_type = new stdClass(); 378 $product_post_type->name = 'product'; 379 $product_post_type->label = 'Product'; 380 381 $post_types[] = $product_post_type; 382 } 383 384 return $post_types; 385 } 368 386 369 387 private function print_field_select( $option, $fields = [] ) { -
botamp/trunk/admin/partials/botamp-admin-display.php
r1620297 r1651096 6 6 * 7 7 * @link support@botamp.com 8 * @since 1.3. 18 * @since 1.3.2 9 9 * 10 10 * @package Botamp -
botamp/trunk/botamp.php
r1620297 r1651096 9 9 * 10 10 * @link support@botamp.com 11 * @since 1.3. 111 * @since 1.3.2 12 12 * @package Botamp 13 13 * … … 16 16 * Plugin URI: https://botamp.com 17 17 * Description: Botamp plugin for Wordpress. The easiest way to sync your WordPress site content with Botamp. 18 * Version: 1.3. 118 * Version: 1.3.2 19 19 * Author: Botamp, Inc. <support@botamp.com> 20 20 * Author URI: support@botamp.com … … 64 64 * not affect the page life cycle. 65 65 * 66 * @since 1.3. 166 * @since 1.3.2 67 67 */ 68 68 function run_botamp() { -
botamp/trunk/includes/class-botamp-activator.php
r1620297 r1651096 4 4 * 5 5 * @link support@botamp.com 6 * @since 1.3. 16 * @since 1.3.2 7 7 * 8 8 * @package Botamp … … 15 15 * This class defines all code necessary to run during the plugin's activation. 16 16 * 17 * @since 1.3. 117 * @since 1.3.2 18 18 * @package Botamp 19 19 * @subpackage Botamp/includes … … 28 28 * Long Description. 29 29 * 30 * @since 1.3. 130 * @since 1.3.2 31 31 */ 32 32 public static function activate() { -
botamp/trunk/includes/class-botamp-deactivator.php
r1620297 r1651096 4 4 * 5 5 * @link support@botamp.com 6 * @since 1.3. 16 * @since 1.3.2 7 7 * 8 8 * @package Botamp … … 15 15 * This class defines all code necessary to run during the plugin's deactivation. 16 16 * 17 * @since 1.3. 117 * @since 1.3.2 18 18 * @package Botamp 19 19 * @subpackage Botamp/includes … … 27 27 * Long Description. 28 28 * 29 * @since 1.3. 129 * @since 1.3.2 30 30 */ 31 31 public static function deactivate() { -
botamp/trunk/includes/class-botamp-i18n.php
r1620297 r1651096 7 7 * 8 8 * @link support@botamp.com 9 * @since 1.3. 19 * @since 1.3.2 10 10 * 11 11 * @package Botamp … … 19 19 * so that it is ready for translation. 20 20 * 21 * @since 1.3. 121 * @since 1.3.2 22 22 * @package Botamp 23 23 * @subpackage Botamp/includes … … 30 30 * Load the plugin text domain for translation. 31 31 * 32 * @since 1.3. 132 * @since 1.3.2 33 33 */ 34 34 public function load_plugin_textdomain() { -
botamp/trunk/includes/class-botamp-loader.php
r1620297 r1651096 4 4 * 5 5 * @link support@botamp.com 6 * @since 1.3. 16 * @since 1.3.2 7 7 * 8 8 * @package Botamp … … 26 26 * The array of actions registered with WordPress. 27 27 * 28 * @since 1.3. 128 * @since 1.3.2 29 29 * @access protected 30 30 * @var array $actions The actions registered with WordPress to fire when the plugin loads. … … 35 35 * The array of filters registered with WordPress. 36 36 * 37 * @since 1.3. 137 * @since 1.3.2 38 38 * @access protected 39 39 * @var array $filters The filters registered with WordPress to fire when the plugin loads. … … 44 44 * Initialize the collections used to maintain the actions and filters. 45 45 * 46 * @since 1.3. 146 * @since 1.3.2 47 47 */ 48 48 public function __construct() { … … 56 56 * Add a new action to the collection to be registered with WordPress. 57 57 * 58 * @since 1.3. 158 * @since 1.3.2 59 59 * @param string $hook The name of the WordPress action that is being registered. 60 60 * @param object $component A reference to the instance of the object on which the action is defined. … … 70 70 * Add a new filter to the collection to be registered with WordPress. 71 71 * 72 * @since 1.3. 172 * @since 1.3.2 73 73 * @param string $hook The name of the WordPress filter that is being registered. 74 74 * @param object $component A reference to the instance of the object on which the filter is defined. … … 85 85 * collection. 86 86 * 87 * @since 1.3. 187 * @since 1.3.2 88 88 * @access private 89 89 * @param array $hooks The collection of hooks that is being registered (that is, actions or filters). … … 112 112 * Register the filters and actions with WordPress. 113 113 * 114 * @since 1.3. 1114 * @since 1.3.2 115 115 */ 116 116 public function run() { -
botamp/trunk/includes/class-botamp.php
r1620297 r1651096 7 7 * 8 8 * @link support@botamp.com 9 * @since 1.3. 19 * @since 1.3.2 10 10 * 11 11 * @package Botamp … … 22 22 * version of the plugin. 23 23 * 24 * @since 1.3. 124 * @since 1.3.2 25 25 * @package Botamp 26 26 * @subpackage Botamp/includes … … 33 33 * the plugin. 34 34 * 35 * @since 1.3. 135 * @since 1.3.2 36 36 * @access protected 37 37 * @var Botamp_Loader $loader Maintains and registers all hooks for the plugin. … … 42 42 * The unique identifier of this plugin. 43 43 * 44 * @since 1.3. 144 * @since 1.3.2 45 45 * @access protected 46 46 * @var string $plugin_name The string used to uniquely identify this plugin. … … 51 51 * The current version of the plugin. 52 52 * 53 * @since 1.3. 153 * @since 1.3.2 54 54 * @access protected 55 55 * @var string $version The current version of the plugin. … … 64 64 * the public-facing side of the site. 65 65 * 66 * @since 1.3. 166 * @since 1.3.2 67 67 */ 68 68 public function __construct() { 69 69 70 70 $this->plugin_name = 'botamp'; 71 $this->version = '1.3. 1';71 $this->version = '1.3.2'; 72 72 73 73 $this->load_dependencies(); … … 94 94 * with WordPress. 95 95 * 96 * @since 1.3. 196 * @since 1.3.2 97 97 * @access private 98 98 */ … … 136 136 * with WordPress. 137 137 * 138 * @since 1.3. 1138 * @since 1.3.2 139 139 * @access private 140 140 */ … … 151 151 * of the plugin. 152 152 * 153 * @since 1.3. 1153 * @since 1.3.2 154 154 * @access private 155 155 */ … … 195 195 * of the plugin. 196 196 * 197 * @since 1.3. 1197 * @since 1.3.2 198 198 * @access private 199 199 */ … … 209 209 * Run the loader to execute all of the hooks with WordPress. 210 210 * 211 * @since 1.3. 1211 * @since 1.3.2 212 212 */ 213 213 public function run() { … … 219 219 * WordPress and to define internationalization functionality. 220 220 * 221 * @since 1.3. 1221 * @since 1.3.2 222 222 * @return string The name of the plugin. 223 223 */ … … 229 229 * The reference to the class that orchestrates the hooks with the plugin. 230 230 * 231 * @since 1.3. 1231 * @since 1.3.2 232 232 * @return Botamp_Loader Orchestrates the hooks of the plugin. 233 233 */ … … 239 239 * Retrieve the version number of the plugin. 240 240 * 241 * @since 1.3. 1241 * @since 1.3.2 242 242 * @return string The version number of the plugin. 243 243 */ -
botamp/trunk/public/partials/botamp-public-display.php
r1620297 r1651096 6 6 * 7 7 * @link support@botamp.com 8 * @since 1.3. 18 * @since 1.3.2 9 9 * 10 10 * @package Botamp
Note: See TracChangeset
for help on using the changeset viewer.