Plugin Directory

Changeset 3002758


Ignore:
Timestamp:
11/28/2023 01:40:29 PM (2 years ago)
Author:
bouncingsprout
Message:

copy to tag

Location:
boomerang/tags/1.0.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • boomerang/tags/1.0.0/boomerang.php

    r2997674 r3002758  
    77 * Requires at least:   5.2
    88 * Requires PHP:        7.0
    9  * Author:              Ben Roberts
     9 * Author:              Bouncingsprout Studio
    1010 * License:             GPL v2 or later
    1111 * License URI:         https://www.gnu.org/licenses/gpl-2.0.html
     
    1313 * Domain Path:         /languages
    1414 * Version:             1.0.0
     15 *
     16 * @fs_premium_only /admin/inc/classes/class-boomerang-customizer.php, /inc/boomerang-pro-filters.php
    1517 */
    1618
     
    2123}
    2224
    23 if ( ! function_exists( 'boo_fs' ) ) {
    24     // Create a helper function for easy SDK access.
    25     function boo_fs() {
    26         global $boo_fs;
     25if ( function_exists( 'boo_fs' ) ) {
     26    boo_fs()->set_basename( true, __FILE__ );
     27} else {
     28    // DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE `function_exists` CALL ABOVE TO PROPERLY WORK.
     29    if ( ! function_exists( 'boo_fs' ) ) {
     30        // Create a helper function for easy SDK access.
     31        function boo_fs() {
     32            global $boo_fs;
    2733
    28         if ( ! isset( $boo_fs ) ) {
    29             // Include Freemius SDK.
    30             require_once dirname( __FILE__ ) . '/freemius/start.php';
     34            if ( ! isset( $boo_fs ) ) {
     35                // Include Freemius SDK.
     36                require_once dirname( __FILE__ ) . '/freemius/start.php';
    3137
    32             $boo_fs = fs_dynamic_init(
    33                 array(
    34                     'id'             => '14215',
    35                     'slug'           => 'boomerang',
    36                     'type'           => 'plugin',
    37                     'public_key'     => 'pk_227b2104cb4396d666b43182e1861',
    38                     'is_premium'     => false,
    39                     'has_addons'     => false,
    40                     'has_paid_plans' => false,
    41                     'menu'           => array(
    42                         'slug' => 'edit.php?post_type=boomerang',
     38                $boo_fs = fs_dynamic_init( array(
     39                    'id'              => '14215',
     40                    'slug'            => 'boomerang',
     41                    'premium_slug'    => 'boomerang-pro',
     42                    'type'            => 'plugin',
     43                    'public_key'      => 'pk_227b2104cb4396d666b43182e1861',
     44                    'is_premium'      => true,
     45                    'is_premium_only' => true,
     46                    'has_addons'      => false,
     47                    'has_paid_plans'  => true,
     48                    'menu'            => array(
     49                        'slug'    => 'edit.php?post_type=boomerang',
     50                        'support' => false,
    4351                    ),
    44                 )
    45             );
     52                ) );
     53            }
     54
     55            return $boo_fs;
    4656        }
    4757
    48         return $boo_fs;
     58        // Init Freemius.
     59        boo_fs();
     60        // Signal that SDK was initiated.
     61        do_action( 'boo_fs_loaded' );
    4962    }
    5063
    51     // Init Freemius.
    52     boo_fs();
    53     // Signal that SDK was initiated.
    54     do_action( 'boo_fs_loaded' );
    55 }
     64    define( 'BOOMERANG_PATH', plugin_dir_path( __FILE__ ) );
     65    define( 'BOOMERANG_URL', plugin_dir_url( __FILE__ ) );
     66    define( 'BOOMERANG_BASENAME', plugin_basename( __FILE__ ) );
     67    define( 'BOOMERANG_VERSION', '1.0.0' );
    5668
    57 define( 'BOOMERANG_PATH', plugin_dir_path( __FILE__ ) );
    58 define( 'BOOMERANG_URL', plugin_dir_url( __FILE__ ) );
    59 define( 'BOOMERANG_BASENAME', plugin_basename( __FILE__ ) );
    60 define( 'BOOMERANG_VERSION', boomerang_get_version() );
     69    /**
     70     * Get the plugin's version number.
     71     *
     72     * @deprecated
     73     *
     74     * @return mixed
     75     */
     76    function boomerang_get_version() {
     77        if ( ! function_exists( 'get_plugin_data' ) ) {
     78            require_once ABSPATH . 'wp-admin/includes/plugin.php';
     79        }
    6180
    62 /**
    63  * Get the plugin's version number.
    64  *
    65  * @return mixed
    66  */
    67 function boomerang_get_version() {
    68     if ( ! function_exists( 'get_plugin_data' ) ) {
    69         require_once ABSPATH . 'wp-admin/includes/plugin.php';
     81        $plugin_data = get_plugin_data( __FILE__ );
     82
     83        return $plugin_data['Version'];
    7084    }
    7185
    72     $plugin_data = get_plugin_data( __FILE__ );
     86    /**
     87     * Start the engines, Captain...
     88     */
     89    function boomerang_init() {
     90        require_once BOOMERANG_PATH . 'vendor/codestar-framework/codestar-framework.php';
     91        require BOOMERANG_PATH . '/inc/classes/class-boomerang.php';
     92        require BOOMERANG_PATH . '/inc/boomerang-global-functions.php';
    7393
    74     return $plugin_data['Version'];
    75 }
    76 
    77 /**
    78  * Start the engines, Captain...
    79  */
    80 function boomerang_init() {
    81     require_once BOOMERANG_PATH . 'vendor/codestar-framework/codestar-framework.php';
    82     require BOOMERANG_PATH . '/inc/classes/class-boomerang.php';
    83     require BOOMERANG_PATH . '/inc/boomerang-global-functions.php';
    84 
    85     $boomerang = new Boomerang();
    86 }
    87 boomerang_init();
    88 
    89 /**
    90  * Tasks to run on plugin activation.
    91  */
    92 function boomerang_activate() {
    93 
    94     if ( ! class_exists( 'Boomerang_CPT_Helper' ) ) {
    95         require_once BOOMERANG_PATH . '/inc/classes/class-boomerang-cpt-helper.php';
     94        $boomerang = new Boomerang();
    9695    }
    9796
    98     $cpt = new Boomerang_CPT_Helper();
    99     $cpt->register_post_types();
     97    boomerang_init();
    10098
    101     flush_rewrite_rules();
     99    /**
     100     * Tasks to run on plugin activation.
     101     */
     102    function boomerang_activate() {
     103        if ( ! class_exists( 'Boomerang_CPT_Helper' ) ) {
     104            require_once BOOMERANG_PATH . '/inc/classes/class-boomerang-cpt-helper.php';
     105        }
     106
     107        $cpt = new Boomerang_CPT_Helper();
     108        $cpt->register_post_types();
     109
     110        flush_rewrite_rules();
     111    }
     112
     113    register_activation_hook( __FILE__, __NAMESPACE__ . '\boomerang_activate' );
    102114}
    103 register_activation_hook( __FILE__, __NAMESPACE__ . '\boomerang_activate' );
  • boomerang/tags/1.0.0/readme.txt

    r2997674 r3002758  
    3333= The Boomerang Block =
    3434
    35 The Boomerang archive comes with everything you need to create and list Boomerangs. A modern, AJAX-enabled form. AJAX-enabled filters to narrow down the Boomerang list. But how do you display it? You can set up each board in your menus (they are actually just custom post types like any other). Alternatively, you could add your Boomerang listing to any page, using the Boomerang shortcode (you'll see this at the top of each board's settings page). Even easier, you could use the Boomerang Block to pick a board you've already created, and add that directly into your block editor.
     35The Boomerang archive comes with everything you need to create and list Boomerangs. A modern, AJAX-enabled form. AJAX-enabled filters to narrow down the Boomerang list. But how do you display it? Add your Boomerang listing to any page, using the Boomerang shortcode (you'll see this at the top of each board's settings page). Even easier, you could use the Boomerang Block to pick a board you've already created, and add that directly into your block editor.
    3636
    3737= Statuses =
     
    47471. Install and activate Boomerang. Opt in so we can send you updates on how Boomerang is evolving.
    48482. Change your permalinks under Settings > Permalinks. You probably don't want to call your feature requests Boomerangs, right?
    49 3. Create you first board. Use our shortcode or block to add it to any page, or add the board archive to your main menu.
     493. Create you first board. Use our shortcode or block to add it to any page.
    50504. Create your first Boomerang. It won't look like much.
    51515. Head to your board's settings page in the back-end, and configure it any way you choose.
     
    5656[Facebook](https://www.facebook.com/boomerangWP/)
    5757
     58== Screenshots ==
     591. Boomerang Listing Page (Pro Edition - coming soon)
     602. Single Boomerang Page (Pro Edition - coming soon)
     61
    5862== Changelog ==
    5963
Note: See TracChangeset for help on using the changeset viewer.