Plugin Directory

Changeset 1651096


Ignore:
Timestamp:
05/04/2017 03:12:04 PM (9 years ago)
Author:
ousmanedev
Message:

Publish version 1.3.2

Location:
botamp/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • botamp/trunk/admin/class-botamp-admin.php

    r1620274 r1651096  
    1717
    1818    public function __construct( $plugin_name, $version ) {
     19        global $wp_post_types;
     20
    1921        $this->plugin_name = $plugin_name;
    2022        $this->version = $version;
    21         $this->post_types = get_post_types( '', 'objects' );
     23        $this->post_types = $this->get_post_types();
    2224
    2325        global $wpdb;
     
    366368        $me_proxy->get();
    367369    }
     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    }
    368386
    369387    private function print_field_select( $option, $fields = [] ) {
  • botamp/trunk/admin/partials/botamp-admin-display.php

    r1620297 r1651096  
    66 *
    77 * @link       support@botamp.com
    8  * @since      1.3.1
     8 * @since      1.3.2
    99 *
    1010 * @package    Botamp
  • botamp/trunk/botamp.php

    r1620297 r1651096  
    99 *
    1010 * @link              support@botamp.com
    11  * @since             1.3.1
     11 * @since             1.3.2
    1212 * @package           Botamp
    1313 *
     
    1616 * Plugin URI:        https://botamp.com
    1717 * Description:       Botamp plugin for Wordpress. The easiest way to sync your WordPress site content with Botamp.
    18  * Version:           1.3.1
     18 * Version:           1.3.2
    1919 * Author:            Botamp, Inc. <support@botamp.com>
    2020 * Author URI:        support@botamp.com
     
    6464 * not affect the page life cycle.
    6565 *
    66  * @since    1.3.1
     66 * @since    1.3.2
    6767 */
    6868function run_botamp() {
  • botamp/trunk/includes/class-botamp-activator.php

    r1620297 r1651096  
    44 *
    55 * @link       support@botamp.com
    6  * @since      1.3.1
     6 * @since      1.3.2
    77 *
    88 * @package    Botamp
     
    1515 * This class defines all code necessary to run during the plugin's activation.
    1616 *
    17  * @since      1.3.1
     17 * @since      1.3.2
    1818 * @package    Botamp
    1919 * @subpackage Botamp/includes
     
    2828     * Long Description.
    2929     *
    30      * @since    1.3.1
     30     * @since    1.3.2
    3131     */
    3232    public static function activate() {
  • botamp/trunk/includes/class-botamp-deactivator.php

    r1620297 r1651096  
    44 *
    55 * @link       support@botamp.com
    6  * @since      1.3.1
     6 * @since      1.3.2
    77 *
    88 * @package    Botamp
     
    1515 * This class defines all code necessary to run during the plugin's deactivation.
    1616 *
    17  * @since      1.3.1
     17 * @since      1.3.2
    1818 * @package    Botamp
    1919 * @subpackage Botamp/includes
     
    2727     * Long Description.
    2828     *
    29      * @since    1.3.1
     29     * @since    1.3.2
    3030     */
    3131    public static function deactivate() {
  • botamp/trunk/includes/class-botamp-i18n.php

    r1620297 r1651096  
    77 *
    88 * @link       support@botamp.com
    9  * @since      1.3.1
     9 * @since      1.3.2
    1010 *
    1111 * @package    Botamp
     
    1919 * so that it is ready for translation.
    2020 *
    21  * @since      1.3.1
     21 * @since      1.3.2
    2222 * @package    Botamp
    2323 * @subpackage Botamp/includes
     
    3030     * Load the plugin text domain for translation.
    3131     *
    32      * @since    1.3.1
     32     * @since    1.3.2
    3333     */
    3434    public function load_plugin_textdomain() {
  • botamp/trunk/includes/class-botamp-loader.php

    r1620297 r1651096  
    44 *
    55 * @link       support@botamp.com
    6  * @since      1.3.1
     6 * @since      1.3.2
    77 *
    88 * @package    Botamp
     
    2626     * The array of actions registered with WordPress.
    2727     *
    28      * @since    1.3.1
     28     * @since    1.3.2
    2929     * @access   protected
    3030     * @var      array    $actions    The actions registered with WordPress to fire when the plugin loads.
     
    3535     * The array of filters registered with WordPress.
    3636     *
    37      * @since    1.3.1
     37     * @since    1.3.2
    3838     * @access   protected
    3939     * @var      array    $filters    The filters registered with WordPress to fire when the plugin loads.
     
    4444     * Initialize the collections used to maintain the actions and filters.
    4545     *
    46      * @since    1.3.1
     46     * @since    1.3.2
    4747     */
    4848    public function __construct() {
     
    5656     * Add a new action to the collection to be registered with WordPress.
    5757     *
    58      * @since    1.3.1
     58     * @since    1.3.2
    5959     * @param    string $hook             The name of the WordPress action that is being registered.
    6060     * @param    object $component        A reference to the instance of the object on which the action is defined.
     
    7070     * Add a new filter to the collection to be registered with WordPress.
    7171     *
    72      * @since    1.3.1
     72     * @since    1.3.2
    7373     * @param    string $hook             The name of the WordPress filter that is being registered.
    7474     * @param    object $component        A reference to the instance of the object on which the filter is defined.
     
    8585     * collection.
    8686     *
    87      * @since    1.3.1
     87     * @since    1.3.2
    8888     * @access   private
    8989     * @param    array  $hooks            The collection of hooks that is being registered (that is, actions or filters).
     
    112112     * Register the filters and actions with WordPress.
    113113     *
    114      * @since    1.3.1
     114     * @since    1.3.2
    115115     */
    116116    public function run() {
  • botamp/trunk/includes/class-botamp.php

    r1620297 r1651096  
    77 *
    88 * @link       support@botamp.com
    9  * @since      1.3.1
     9 * @since      1.3.2
    1010 *
    1111 * @package    Botamp
     
    2222 * version of the plugin.
    2323 *
    24  * @since      1.3.1
     24 * @since      1.3.2
    2525 * @package    Botamp
    2626 * @subpackage Botamp/includes
     
    3333     * the plugin.
    3434     *
    35      * @since    1.3.1
     35     * @since    1.3.2
    3636     * @access   protected
    3737     * @var      Botamp_Loader    $loader    Maintains and registers all hooks for the plugin.
     
    4242     * The unique identifier of this plugin.
    4343     *
    44      * @since    1.3.1
     44     * @since    1.3.2
    4545     * @access   protected
    4646     * @var      string    $plugin_name    The string used to uniquely identify this plugin.
     
    5151     * The current version of the plugin.
    5252     *
    53      * @since    1.3.1
     53     * @since    1.3.2
    5454     * @access   protected
    5555     * @var      string    $version    The current version of the plugin.
     
    6464     * the public-facing side of the site.
    6565     *
    66      * @since    1.3.1
     66     * @since    1.3.2
    6767     */
    6868    public function __construct() {
    6969
    7070        $this->plugin_name = 'botamp';
    71         $this->version = '1.3.1';
     71        $this->version = '1.3.2';
    7272
    7373        $this->load_dependencies();
     
    9494     * with WordPress.
    9595     *
    96      * @since    1.3.1
     96     * @since    1.3.2
    9797     * @access   private
    9898     */
     
    136136     * with WordPress.
    137137     *
    138      * @since    1.3.1
     138     * @since    1.3.2
    139139     * @access   private
    140140     */
     
    151151     * of the plugin.
    152152     *
    153      * @since    1.3.1
     153     * @since    1.3.2
    154154     * @access   private
    155155     */
     
    195195     * of the plugin.
    196196     *
    197      * @since    1.3.1
     197     * @since    1.3.2
    198198     * @access   private
    199199     */
     
    209209     * Run the loader to execute all of the hooks with WordPress.
    210210     *
    211      * @since    1.3.1
     211     * @since    1.3.2
    212212     */
    213213    public function run() {
     
    219219     * WordPress and to define internationalization functionality.
    220220     *
    221      * @since     1.3.1
     221     * @since     1.3.2
    222222     * @return    string    The name of the plugin.
    223223     */
     
    229229     * The reference to the class that orchestrates the hooks with the plugin.
    230230     *
    231      * @since     1.3.1
     231     * @since     1.3.2
    232232     * @return    Botamp_Loader    Orchestrates the hooks of the plugin.
    233233     */
     
    239239     * Retrieve the version number of the plugin.
    240240     *
    241      * @since     1.3.1
     241     * @since     1.3.2
    242242     * @return    string    The version number of the plugin.
    243243     */
  • botamp/trunk/public/partials/botamp-public-display.php

    r1620297 r1651096  
    66 *
    77 * @link       support@botamp.com
    8  * @since      1.3.1
     8 * @since      1.3.2
    99 *
    1010 * @package    Botamp
Note: See TracChangeset for help on using the changeset viewer.