| @@ -1,14 +1,14 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Plugin Name: Woody code snippets (PHP snippets | Insert PHP) | |
| 4 | - * Plugin URI: https://woodysnippet.com/ | |
| 3 | + * Plugin Name: Woody ad snippets (PHP snippets | Insert PHP) | |
| 4 | + * Plugin URI: http://woody-ad-snippets.webcraftic.com/ | |
| 5 | 5 | * Description: Executes PHP code, uses conditional logic to insert ads, text, media content and external service’s code. Ensures no content duplication. |
| 6 | - * Author: Creative Motion, Will Bontrager Software, LLC <will@willmaster.com> | |
| 7 | - * Version: 2.4.2 | |
| 6 | + * Author: Will Bontrager Software, LLC <will@willmaster.com>, Webcraftic <wordpress.webraftic@gmail.com> | |
| 7 | + * Version: 2.2.7 | |
| 8 | 8 | * Text Domain: insert-php |
| 9 | 9 | * Domain Path: /languages/ |
| 10 | - * Author URI: http://cm-wp.com | |
| 10 | + * Author URI: http://webcraftic.com | |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Developers who contributions in the development plugin: |
| @@ -19,9 +19,9 @@ | ||
| 19 | 19 | * This was the founder of this plugin. |
| 20 | 20 | * |
| 21 | 21 | * If you are a long-term user, you may be confused about the new plugin update. |
| 22 | 22 | * You’ve been using an old plugin – Insert php 1.3.0, and now got an extended |
| 23 | - * product – Woody Code Snippets. Insert php was the first plugin version to work | |
| 23 | + * product – Woody ad snippets. Insert php was the first plugin version to work | |
| 24 | 24 | * with PHP code. It was created by Will Bontrager Software, LLC. In 2018, the |
| 25 | 25 | * Webcraftic studio started to actively develop the plugin. We’ve created a |
| 26 | 26 | * roadmap and released several powerful updates that help you to use PHP code |
| 27 | 27 | * more comfortable and secure. Now plugin supports not only PHP but other |
| @@ -49,16 +49,17 @@ | ||
| 49 | 49 | * |
| 50 | 50 | * Personal repo: https://github.com/nechin |
| 51 | 51 | * --------------------------------------------------------------------------------- |
| 52 | 52 | * |
| 53 | - * Artem Prihodko | |
| 53 | + * Alexander Teshabaev | |
| 54 | 54 | * --------------------------------------------------------------------------------- |
| 55 | - * 2.3.2v - current | |
| 55 | + * 2.0.6v. - 2.2.1v - Development snippets library and block for the Guttenberg editor. | |
| 56 | 56 | * |
| 57 | - * Email: webtemyk@yandex.ru | |
| 58 | - * Personal repo: https://github.com/temyk | |
| 57 | + * Personal repo: https://github.com/bologer | |
| 59 | 58 | * --------------------------------------------------------------------------------- |
| 60 | 59 | * |
| 60 | + * All development rights belong to @webcraftic studio. | |
| 61 | + * http://webcraftic.com | |
| 61 | 62 | */ |
| 62 | 63 | |
| 63 | 64 | // Exit if accessed directly |
| 64 | 65 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -63,8 +64,9 @@ | ||
| 63 | 64 | // Exit if accessed directly |
| 64 | 65 | if ( ! defined( 'ABSPATH' ) ) { |
| 65 | 66 | exit; |
| 66 | 67 | } |
| 68 | + | |
| 67 | 69 | // @formatter:off |
| 68 | 70 | |
| 69 | 71 | |
| 70 | 72 | |
| @@ -80,9 +82,9 @@ | ||
| 80 | 82 | |
| 81 | 83 | $plugin_info = array( |
| 82 | 84 | 'prefix' => 'wbcr_inp_', |
| 83 | 85 | 'plugin_name' => 'wbcr_insert_php', |
| 84 | - 'plugin_title' => __( 'Woody Code Snippets', 'insert-php' ), | |
| 86 | + 'plugin_title' => __( 'Woody ad snippets', 'insert-php' ), | |
| 85 | 87 | 'plugin_text_domain' => 'insert-php', |
| 86 | 88 | |
| 87 | 89 | // PLUGIN SUPPORT |
| 88 | 90 | 'support_details' => array( |
| @@ -87,9 +89,9 @@ | ||
| 87 | 89 | // PLUGIN SUPPORT |
| 88 | 90 | 'support_details' => array( |
| 89 | 91 | 'url' => 'https://r.freemius.com/3465/1916966/http://woody-ad-snippets.webcraftic.com', |
| 90 | 92 | 'affiliate_url' => 'https://r.freemius.com/3465/1916966/', |
| 91 | - 'pages_map' => array( | |
| 93 | + 'pages_map' => array( | |
| 92 | 94 | 'features' => 'premium-features', // {site}/premium-features |
| 93 | 95 | 'pricing' => 'pricing', // {site}/prices |
| 94 | 96 | 'support' => 'support', // {site}/support |
| 95 | 97 | 'docs' => 'getting-started-with-woody-ad-snippets', // {site}/docs |
| @@ -95,16 +97,8 @@ | ||
| 95 | 97 | 'docs' => 'getting-started-with-woody-ad-snippets', // {site}/docs |
| 96 | 98 | ), |
| 97 | 99 | ), |
| 98 | 100 | |
| 99 | - // PLUGIN ADVERTS | |
| 100 | - 'render_adverts' => true, | |
| 101 | - 'adverts_settings' => array( | |
| 102 | - 'dashboard_widget' => true, // show dashboard widget (default: false) | |
| 103 | - 'right_sidebar' => true, // show adverts sidebar (default: false) | |
| 104 | - 'notice' => true, // show notice message (default: false) | |
| 105 | - ), | |
| 106 | - | |
| 107 | 101 | // PLUGIN UPDATED SETTINGS |
| 108 | 102 | /*'has_updates' => false, |
| 109 | 103 | 'updates_settings' => array( |
| 110 | 104 | 'repository' => 'wordpress', |
| @@ -133,19 +127,17 @@ | ||
| 133 | 127 | ), |
| 134 | 128 | |
| 135 | 129 | // FRAMEWORK MODULES |
| 136 | 130 | 'load_factory_modules' => array( |
| 137 | - array( 'libs/factory/bootstrap', 'factory_bootstrap_450', 'admin' ), | |
| 138 | - array( 'libs/factory/forms', 'factory_forms_447', 'admin' ), | |
| 139 | - array( 'libs/factory/pages', 'factory_pages_449', 'admin' ), | |
| 131 | + array( 'libs/factory/bootstrap', 'factory_bootstrap_420', 'admin' ), | |
| 132 | + array( 'libs/factory/forms', 'factory_forms_417', 'admin' ), | |
| 133 | + array( 'libs/factory/pages', 'factory_pages_419', 'admin' ), | |
| 140 | 134 | array( 'libs/factory/types', 'factory_types_410' ), |
| 141 | 135 | array( 'libs/factory/taxonomies', 'factory_taxonomies_330' ), |
| 142 | 136 | array( 'libs/factory/metaboxes', 'factory_metaboxes_409', 'admin' ), |
| 143 | 137 | array( 'libs/factory/viewtables', 'factory_viewtables_410', 'admin' ), |
| 144 | 138 | array( 'libs/factory/shortcodes', 'factory_shortcodes_329', 'all' ), |
| 145 | - array( 'libs/factory/freemius', 'factory_freemius_138', 'all' ), | |
| 146 | - array( 'libs/factory/adverts', 'factory_adverts_128', 'admin' ), | |
| 147 | - array( 'libs/factory/feedback', 'factory_feedback_112', 'admin' ) | |
| 139 | + array( 'libs/factory/freemius', 'factory_freemius_108', 'all' ), | |
| 148 | 140 | ), |
| 149 | 141 | ); |
| 150 | 142 | |
| 151 | 143 | /** |
| @@ -150,12 +142,12 @@ | ||
| 150 | 142 | |
| 151 | 143 | /** |
| 152 | 144 | * Checks compatibility with WordPress, php and other plugins. |
| 153 | 145 | */ |
| 154 | -$wbcr_compatibility = new Wbcr_Factory450_Requirements( __FILE__, array_merge( $plugin_info, array( | |
| 146 | +$wbcr_compatibility = new Wbcr_Factory419_Requirements( __FILE__, array_merge( $plugin_info, array( | |
| 155 | 147 | 'plugin_already_activate' => defined( 'WINP_PLUGIN_ACTIVE' ), |
| 156 | - 'required_php_version' => '7.0', | |
| 157 | - 'required_wp_version' => '4.8.0', | |
| 148 | + 'required_php_version' => '5.4', | |
| 149 | + 'required_wp_version' => '4.2.0', | |
| 158 | 150 | ) ) ); |
| 159 | 151 | |
| 160 | 152 | /** |
| 161 | 153 | * If the plugin is compatible, it will continue its work, otherwise it will be stopped and the user will receive a warning. |
| @@ -194,23 +186,28 @@ | ||
| 194 | 186 | define( 'WINP_SNIPPET_TYPE_UNIVERSAL', 'universal' ); |
| 195 | 187 | define( 'WINP_SNIPPET_TYPE_CSS', 'css' ); |
| 196 | 188 | define( 'WINP_SNIPPET_TYPE_JS', 'js' ); |
| 197 | 189 | define( 'WINP_SNIPPET_TYPE_HTML', 'html' ); |
| 198 | -define( 'WINP_SNIPPET_TYPE_AD', 'advert' ); | |
| 199 | 190 | |
| 191 | +// The snippet automatic insertion locations | |
| 192 | +define( 'WINP_SNIPPET_AUTO_HEADER', 'header' ); | |
| 193 | +define( 'WINP_SNIPPET_AUTO_FOOTER', 'footer' ); | |
| 194 | +define( 'WINP_SNIPPET_AUTO_BEFORE_POST', 'before_post' ); | |
| 195 | +define( 'WINP_SNIPPET_AUTO_BEFORE_CONTENT', 'before_content' ); | |
| 196 | +define( 'WINP_SNIPPET_AUTO_BEFORE_PARAGRAPH', 'before_paragraph' ); | |
| 197 | +define( 'WINP_SNIPPET_AUTO_AFTER_PARAGRAPH', 'after_paragraph' ); | |
| 198 | +define( 'WINP_SNIPPET_AUTO_AFTER_CONTENT', 'after_content' ); | |
| 199 | +define( 'WINP_SNIPPET_AUTO_AFTER_POST', 'after_post' ); | |
| 200 | +define( 'WINP_SNIPPET_AUTO_BEFORE_EXCERPT', 'before_excerpt' ); | |
| 201 | +define( 'WINP_SNIPPET_AUTO_AFTER_EXCERPT', 'after_excerpt' ); | |
| 202 | +define( 'WINP_SNIPPET_AUTO_BETWEEN_POSTS', 'between_posts' ); | |
| 203 | +define( 'WINP_SNIPPET_AUTO_BEFORE_POSTS', 'before_posts' ); | |
| 204 | +define( 'WINP_SNIPPET_AUTO_AFTER_POSTS', 'after_posts' ); | |
| 205 | + | |
| 200 | 206 | require_once( WINP_PLUGIN_DIR . '/libs/factory/core/boot.php' ); |
| 201 | 207 | require_once( WINP_PLUGIN_DIR . '/includes/compat.php' ); |
| 202 | -require_once( WINP_PLUGIN_DIR . '/includes/class.insertion.locations.php' ); | |
| 203 | 208 | require_once( WINP_PLUGIN_DIR . '/includes/class.helpers.php' ); |
| 204 | 209 | require_once( WINP_PLUGIN_DIR . '/includes/class.plugin.php' ); |
| 205 | - | |
| 206 | -/* | |
| 207 | - * Woocommerce Insertion location | |
| 208 | - * @since 2.4 | |
| 209 | - * */ | |
| 210 | - | |
| 211 | -global $winp_snippets_locations; | |
| 212 | -$winp_snippets_locations = new WINP_Insertion_Locations(); | |
| 213 | 210 | |
| 214 | 211 | try { |
| 215 | 212 | new WINP_Plugin( __FILE__, array_merge( $plugin_info, array( |
| 216 | 213 | 'plugin_version' => WINP_PLUGIN_VERSION, |