From f01b8939e16153a2681549159859b398e38d6442 Mon Sep 17 00:00:00 2001 From: Michael Makijenko Date: Thu, 28 Oct 2021 12:12:10 +0300 Subject: [PATCH 1/4] Update all vc appearances with wpb --- README.md | 12 ++-- README.txt | 12 ++-- ...ss-visual-composer-multilanguage-admin.php | 66 +++++++++---------- .../visual-composer-multilanguage-admin.css | 2 +- ...l-composer-multilanguage-admin-display.php | 4 +- ...isual-composer-multilanguage-activator.php | 10 +-- ...ual-composer-multilanguage-deactivator.php | 10 +-- ...ass-visual-composer-multilanguage-i18n.php | 12 ++-- ...s-visual-composer-multilanguage-loader.php | 10 +-- .../class-visual-composer-multilanguage.php | 44 ++++++------- ...s-visual-composer-multilanguage-public.php | 40 +++++------ ...-composer-multilanguage-public-display.php | 4 +- uninstall.php | 2 +- visual-composer-multilanguage.php | 34 +++++----- 14 files changed, 131 insertions(+), 131 deletions(-) diff --git a/README.md b/README.md index 4f2ac30..01a3c91 100644 --- a/README.md +++ b/README.md @@ -2,26 +2,26 @@ Author URI: https://allurewebsolutions.com Plugin URI: https://vc-multilanguage.allureprojects.com/ -Tags: visual composer, multilanguage, multi-language, translate, translation +Tags: wpbakery page builder, multilanguage, multi-language, translate, translation Donate link: https://allurewebsolutions.com/product/donation Tested up to: 5.3 Stable tag: 2.1.2 -This is an add-on plugin for WPBakery Visual Composer that adds multilanguage support and functionality. Version 2.0 now also has automatic translations that you can turn on. +This is an add-on plugin for WPBakery Page Builder that adds multilanguage support and functionality. Version 2.0 now also has automatic translations that you can turn on. ## Description -This is an add-on plugin for WPBakery Visual Composer that adds functionality of a language switcher, making it very easy to create a multi-language site without an additional multi-language or translation plugin. +This is an add-on plugin for WPBakery Page Builder that adds functionality of a language switcher, making it very easy to create a multi-language site without an additional multi-language or translation plugin. In version 2.0, we've added support for automatic translations using the Google Cloud Translate API. -[Full Setup Instructions & Walkthrough](https://allurewebsolutions.com/visual-composer-multilanguage-plugin) +[Full Setup Instructions & Walkthrough](https://allurewebsolutions.com/wpbakery-page-builder-multilanguage-plugin) -[Demo](https://vc-multilanguage.allureprojects.com) +[Demo](https://wpb-multilanguage.allureprojects.com) ## Installation -1) Activate the plugin. Must have Visual Composer also activated. +1) Activate the plugin. Must have WPBakery Page Builder also activated. 2) Go to plugin settings and input the languages you would like to support. 3) Go to VC editor and add rows. Select language from the dropdown and add a class of "language" to the extra classes section. 4) For auto translation, you follow step 3, but leave the text-block inside the row empty. diff --git a/README.txt b/README.txt index 26ad2f3..157bfaa 100755 --- a/README.txt +++ b/README.txt @@ -2,24 +2,24 @@ Contributors: allurewebsolutions Author URI: https://allurewebsolutions.com Plugin URI: https://vc-multilanguage.allureprojects.com/ -Tags: visual composer, multilanguage, multi-language, translate, translation +Tags: wpbakery page builder, multilanguage, multi-language, translate, translation Donate link: https://allurewebsolutions.com/product/donation Tested up to: 5.8 Stable tag: 2.1.2 -This is an add-on plugin for WPBakery Visual Composer that adds multilanguage support and functionality. Version 2.0 now also has automatic translations that you can turn on. +This is an add-on plugin for WPBakery Page Builder that adds multilanguage support and functionality. Version 2.0 now also has automatic translations that you can turn on. == Description == -This is an add-on plugin for WPBakery Visual Composer that adds functionality of a language switcher, making it very easy to create a multi-language site without an additional multi-language or translation plugin. +This is an add-on plugin for WPBakery Page Builder that adds functionality of a language switcher, making it very easy to create a multi-language site without an additional multi-language or translation plugin. In version 2.0, we've added support for automatic translations using the Google Cloud Translate API. -[Full Setup Instructions & Walkthrough](https://allurewebsolutions.com/visual-composer-multilanguage-plugin) +[Full Setup Instructions & Walkthrough](https://allurewebsolutions.com/wpbakery-page-builder-multilanguage-plugin) -[Demo](https://vc-multilanguage.allureprojects.com) +[Demo](https://wpb-multilanguage.allureprojects.com) == Installation == -1) Activate the plugin. Must have Visual Composer also activated. +1) Activate the plugin. Must have WPBakery Page Builder also activated. 2) Go to plugin settings and input the languages you would like to support. 3) Go to VC editor and add rows. Select language from the dropdown and add a class of "language" to the extra classes section. 4) For auto translation, you follow step 3, but leave the text-block inside the row empty. diff --git a/admin/class-visual-composer-multilanguage-admin.php b/admin/class-visual-composer-multilanguage-admin.php index a05b30b..b527efe 100755 --- a/admin/class-visual-composer-multilanguage-admin.php +++ b/admin/class-visual-composer-multilanguage-admin.php @@ -6,8 +6,8 @@ * @link https://allurewebsolutions.com * @since 1.0.0 * - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/admin + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/admin */ /** @@ -16,11 +16,11 @@ * Defines the plugin name, version, and two examples hooks for how to * enqueue the admin-specific stylesheet and JavaScript. * - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/admin + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/admin * @author Allure Web Solutions */ -class Visual_Composer_Multilanguage_Admin { +class Wpbakery_Page_Builder_Multilanguage_Admin { /** * The options name to be used in this plugin @@ -29,7 +29,7 @@ class Visual_Composer_Multilanguage_Admin { * @access private * @var string $option_name Option name of this plugin */ - private $option_name = 'visual_composer_multilanguage'; + private $option_name = 'wpbakery_page_builder_multilanguage'; /** * The ID of this plugin. @@ -75,15 +75,15 @@ public function enqueue_styles() { * This function is provided for demonstration purposes only. * * An instance of this class should be passed to the run() function - * defined in Visual_Composer_Multilanguage_Loader as all of the hooks are defined + * defined in Wpbakery_Page_Builder_Multilanguage_Loader as all of the hooks are defined * in that particular class. * - * The Visual_Composer_Multilanguage_Loader will then create the relationship + * The Wpbakery_Page_Builder_Multilanguage_Loader will then create the relationship * between the defined hooks and the functions defined in this * class. */ - wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/visual-composer-multilanguage-admin.css', array(), $this->version, 'all' ); + wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpbakery-page-builder-multilanguage-admin.css', array(), $this->version, 'all' ); } @@ -98,15 +98,15 @@ public function enqueue_scripts() { * This function is provided for demonstration purposes only. * * An instance of this class should be passed to the run() function - * defined in Visual_Composer_Multilanguage_Loader as all of the hooks are defined + * defined in Wpbakery_Page_Builder_Multilanguage_Loader as all of the hooks are defined * in that particular class. * - * The Visual_Composer_Multilanguage_Loader will then create the relationship + * The Wpbakery_Page_Builder_Multilanguage_Loader will then create the relationship * between the defined hooks and the functions defined in this * class. */ - wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/visual-composer-multilanguage-admin.js', array( 'jquery' ), $this->version, false ); + wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpbakery-page-builder-multilanguage-admin.js', array( 'jquery' ), $this->version, false ); } @@ -118,8 +118,8 @@ public function enqueue_scripts() { public function add_options_page() { $this->plugin_screen_hook_suffix = add_options_page( - __( 'VC Multilanguage Settings', 'visual-composer-multilanguage' ), - __( 'VC Multilanguage', 'visual-composer-multilanguage' ), + __( 'VC Multilanguage Settings', 'wpbakery-page-builder-multilanguage' ), + __( 'VC Multilanguage', 'wpbakery-page-builder-multilanguage' ), 'manage_options', $this->plugin_name, array( $this, 'display_options_page' ) @@ -135,7 +135,7 @@ public function add_options_page() { public function register_setting() { add_settings_section( $this->option_name . '_general', - __( 'General', 'visual-composer-multilanguage' ), + __( 'General', 'wpbakery-page-builder-multilanguage' ), array( $this, $this->option_name . '_general_cb' ), $this->plugin_name ); @@ -143,7 +143,7 @@ public function register_setting() { // Supported languages text field add_settings_field( $this->option_name . '_languages', - __( 'Languages', 'visual-composer-multilanguage' ), + __( 'Languages', 'wpbakery-page-builder-multilanguage' ), array( $this, $this->option_name . '_languages_cb' ), $this->plugin_name, $this->option_name . '_general', @@ -153,7 +153,7 @@ public function register_setting() { // Supported languages text field add_settings_field( $this->option_name . '_default_language', - __( 'Select Default Language', 'visual-composer-multilanguage' ), + __( 'Select Default Language', 'wpbakery-page-builder-multilanguage' ), array( $this, $this->option_name . '_default_language_cb' ), $this->plugin_name, $this->option_name . '_general', @@ -163,7 +163,7 @@ public function register_setting() { // Activate language switcher add_settings_field( $this->option_name . '_switcher', - __( 'Activate Language Switcher', 'visual-composer-multilanguage' ), + __( 'Activate Language Switcher', 'wpbakery-page-builder-multilanguage' ), array( $this, $this->option_name . '_switcher_cb' ), $this->plugin_name, $this->option_name . '_general', @@ -173,7 +173,7 @@ public function register_setting() { // Activate automatic translations add_settings_field( $this->option_name . '_autotranslate', - __( 'Activate Automatic Translations', 'visual-composer-multilanguage' ), + __( 'Activate Automatic Translations', 'wpbakery-page-builder-multilanguage' ), array( $this, $this->option_name . '_autotranslate_cb' ), $this->plugin_name, $this->option_name . '_general', @@ -183,7 +183,7 @@ public function register_setting() { // Activate styling add_settings_field( $this->option_name . '_styling', - __( 'Activate Styling', 'visual-composer-multilanguage' ), + __( 'Activate Styling', 'wpbakery-page-builder-multilanguage' ), array( $this, $this->option_name . '_styling_cb' ), $this->plugin_name, $this->option_name . '_general', @@ -193,7 +193,7 @@ public function register_setting() { // Google API Key add_settings_field( $this->option_name . '_googleapikey', - __( 'Google Cloud Translate API Key', 'visual-composer-multilanguage' ), + __( 'Google Cloud Translate API Key', 'wpbakery-page-builder-multilanguage' ), array( $this, $this->option_name . '_googleapikey_cb' ), $this->plugin_name, $this->option_name . '_general', @@ -233,14 +233,14 @@ public function register_setting() { * * @since 1.0.0 */ - public function visual_composer_multilanguage_languages_cb() { + public function wpbakery_page_builder_multilanguage_languages_cb() { $languages = get_option( $this->option_name . '_languages' ); ?>
+ placeholder=""/>
+ placeholder=""/>
option_name . '_switcher' ); ?>
@@ -284,7 +284,7 @@ public function visual_composer_multilanguage_switcher_cb() { * * @since 1.0.0 */ - public function visual_composer_multilanguage_autotranslate_cb() { + public function wpbakery_page_builder_multilanguage_autotranslate_cb() { $autotranslate = get_option( $this->option_name . '_autotranslate' ); ?>
@@ -302,7 +302,7 @@ public function visual_composer_multilanguage_autotranslate_cb() { * * @since 1.0.0 */ - public function visual_composer_multilanguage_styling_cb() { + public function wpbakery_page_builder_multilanguage_styling_cb() { $styling = get_option( $this->option_name . '_styling' ); ?>
@@ -320,14 +320,14 @@ public function visual_composer_multilanguage_styling_cb() { * * @since 1.0.0 */ - public function visual_composer_multilanguage_googleapikey_cb() { + public function wpbakery_page_builder_multilanguage_googleapikey_cb() { $googleapikey = get_option( $this->option_name . '_googleapikey' ); ?>
+ placeholder=""/>
' . __( 'List languages you would like supported, separated by a comma.', 'visual-composer-multilanguage' ) . '

'; + public function wpbakery_page_builder_multilanguage_general_cb() { + echo '

' . __( 'List languages you would like supported, separated by a comma.', 'wpbakery-page-builder-multilanguage' ) . '

'; } /** @@ -347,7 +347,7 @@ public function visual_composer_multilanguage_general_cb() { * @since 1.0.0 */ public function display_options_page() { - include_once 'partials/visual-composer-multilanguage-admin-display.php'; + include_once 'partials/wpbakery-page-builder-multilanguage-admin-display.php'; } } diff --git a/admin/css/visual-composer-multilanguage-admin.css b/admin/css/visual-composer-multilanguage-admin.css index b772548..a60da71 100755 --- a/admin/css/visual-composer-multilanguage-admin.css +++ b/admin/css/visual-composer-multilanguage-admin.css @@ -3,6 +3,6 @@ * included in this file. */ -.settings_page_visual-composer-multilanguage input[type=text] { +.settings_page_wpbakery-page-builder-multilanguage input[type=text] { width: 100%; } \ No newline at end of file diff --git a/admin/partials/visual-composer-multilanguage-admin-display.php b/admin/partials/visual-composer-multilanguage-admin-display.php index 6b0ccde..b521975 100755 --- a/admin/partials/visual-composer-multilanguage-admin-display.php +++ b/admin/partials/visual-composer-multilanguage-admin-display.php @@ -8,8 +8,8 @@ * @link https://allurewebsolutions.com * @since 1.0.0 * - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/admin/partials + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/admin/partials */ ?> diff --git a/includes/class-visual-composer-multilanguage-activator.php b/includes/class-visual-composer-multilanguage-activator.php index 834a1db..4cfa19e 100755 --- a/includes/class-visual-composer-multilanguage-activator.php +++ b/includes/class-visual-composer-multilanguage-activator.php @@ -6,8 +6,8 @@ * @link https://allurewebsolutions.com * @since 1.0.0 * - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/includes + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/includes */ /** @@ -16,11 +16,11 @@ * This class defines all code necessary to run during the plugin's activation. * * @since 1.0.0 - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/includes + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/includes * @author Allure Web Solutions */ -class Visual_Composer_Multilanguage_Activator { +class Wpbakery_Page_Builder_Multilanguage_Activator { /** * Short Description. (use period) diff --git a/includes/class-visual-composer-multilanguage-deactivator.php b/includes/class-visual-composer-multilanguage-deactivator.php index 30b75a2..0d8c329 100755 --- a/includes/class-visual-composer-multilanguage-deactivator.php +++ b/includes/class-visual-composer-multilanguage-deactivator.php @@ -6,8 +6,8 @@ * @link https://allurewebsolutions.com * @since 1.0.0 * - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/includes + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/includes */ /** @@ -16,11 +16,11 @@ * This class defines all code necessary to run during the plugin's deactivation. * * @since 1.0.0 - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/includes + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/includes * @author Allure Web Solutions */ -class Visual_Composer_Multilanguage_Deactivator { +class Wpbakery_Page_Builder_Multilanguage_Deactivator { /** * Short Description. (use period) diff --git a/includes/class-visual-composer-multilanguage-i18n.php b/includes/class-visual-composer-multilanguage-i18n.php index 3966d2c..c706610 100755 --- a/includes/class-visual-composer-multilanguage-i18n.php +++ b/includes/class-visual-composer-multilanguage-i18n.php @@ -9,8 +9,8 @@ * @link https://allurewebsolutions.com * @since 1.0.0 * - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/includes + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/includes */ /** @@ -20,11 +20,11 @@ * so that it is ready for translation. * * @since 1.0.0 - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/includes + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/includes * @author Allure Web Solutions */ -class Visual_Composer_Multilanguage_i18n { +class Wpbakery_Page_Builder_Multilanguage_i18n { /** @@ -35,7 +35,7 @@ class Visual_Composer_Multilanguage_i18n { public function load_plugin_textdomain() { load_plugin_textdomain( - 'visual-composer-multilanguage', + 'wpbakery-page-builder-multilanguage', false, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' ); diff --git a/includes/class-visual-composer-multilanguage-loader.php b/includes/class-visual-composer-multilanguage-loader.php index eae4ebc..93f0abc 100755 --- a/includes/class-visual-composer-multilanguage-loader.php +++ b/includes/class-visual-composer-multilanguage-loader.php @@ -6,8 +6,8 @@ * @link https://allurewebsolutions.com * @since 1.0.0 * - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/includes + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/includes */ /** @@ -17,11 +17,11 @@ * the plugin, and register them with the WordPress API. Call the * run function to execute the list of actions and filters. * - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/includes + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/includes * @author Allure Web Solutions */ -class Visual_Composer_Multilanguage_Loader { +class Wpbakery_Page_Builder_Multilanguage_Loader { /** * The array of actions registered with WordPress. diff --git a/includes/class-visual-composer-multilanguage.php b/includes/class-visual-composer-multilanguage.php index 511c66c..bc3dcf7 100755 --- a/includes/class-visual-composer-multilanguage.php +++ b/includes/class-visual-composer-multilanguage.php @@ -9,8 +9,8 @@ * @link https://allurewebsolutions.com * @since 1.0.0 * - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/includes + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/includes */ /** @@ -23,11 +23,11 @@ * version of the plugin. * * @since 1.0.0 - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/includes + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/includes * @author Allure Web Solutions */ -class Visual_Composer_Multilanguage { +class Wpbakery_Page_Builder_Multilanguage { /** * The loader that's responsible for maintaining and registering all hooks that power @@ -35,7 +35,7 @@ class Visual_Composer_Multilanguage { * * @since 1.0.0 * @access protected - * @var Visual_Composer_Multilanguage_Loader $loader Maintains and registers all hooks for the plugin. + * @var Wpbakery_Page_Builder_Multilanguage_Loader $loader Maintains and registers all hooks for the plugin. */ protected $loader; @@ -68,7 +68,7 @@ class Visual_Composer_Multilanguage { */ public function __construct() { - $this->plugin_name = 'visual-composer-multilanguage'; + $this->plugin_name = 'wpbakery-page-builder-multilanguage'; $this->version = '2.0'; $this->load_dependencies(); @@ -83,10 +83,10 @@ public function __construct() { * * Include the following files that make up the plugin: * - * - Visual_Composer_Multilanguage_Loader. Orchestrates the hooks of the plugin. - * - Visual_Composer_Multilanguage_i18n. Defines internationalization functionality. - * - Visual_Composer_Multilanguage_Admin. Defines all hooks for the admin area. - * - Visual_Composer_Multilanguage_Public. Defines all hooks for the public side of the site. + * - Wpbakery_Page_Builder_Multilanguage_Loader. Orchestrates the hooks of the plugin. + * - Wpbakery_Page_Builder_Multilanguage_i18n. Defines internationalization functionality. + * - Wpbakery_Page_Builder_Multilanguage_Admin. Defines all hooks for the admin area. + * - Wpbakery_Page_Builder_Multilanguage_Public. Defines all hooks for the public side of the site. * * Create an instance of the loader which will be used to register the hooks * with WordPress. @@ -100,33 +100,33 @@ private function load_dependencies() { * The class responsible for orchestrating the actions and filters of the * core plugin. */ - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-visual-composer-multilanguage-loader.php'; + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wpbakery-page-builder-multilanguage-loader.php'; /** * The class responsible for defining internationalization functionality * of the plugin. */ - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-visual-composer-multilanguage-i18n.php'; + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wpbakery-page-builder-multilanguage-i18n.php'; /** * The class responsible for defining all actions that occur in the admin area. */ - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-visual-composer-multilanguage-admin.php'; + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wpbakery-page-builder-multilanguage-admin.php'; /** * The class responsible for defining all actions that occur in the public-facing * side of the site. */ - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-visual-composer-multilanguage-public.php'; + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wpbakery-page-builder-multilanguage-public.php'; - $this->loader = new Visual_Composer_Multilanguage_Loader(); + $this->loader = new Wpbakery_Page_Builder_Multilanguage_Loader(); } /** * Define the locale for this plugin for internationalization. * - * Uses the Visual_Composer_Multilanguage_i18n class in order to set the domain and to register the hook + * Uses the Wpbakery_Page_Builder_Multilanguage_i18n class in order to set the domain and to register the hook * with WordPress. * * @since 1.0.0 @@ -134,7 +134,7 @@ private function load_dependencies() { */ private function set_locale() { - $plugin_i18n = new Visual_Composer_Multilanguage_i18n(); + $plugin_i18n = new Wpbakery_Page_Builder_Multilanguage_i18n(); $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' ); @@ -149,7 +149,7 @@ private function set_locale() { */ private function define_admin_hooks() { - $plugin_admin = new Visual_Composer_Multilanguage_Admin( $this->get_plugin_name(), $this->get_version() ); + $plugin_admin = new Wpbakery_Page_Builder_Multilanguage_Admin( $this->get_plugin_name(), $this->get_version() ); $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); @@ -169,12 +169,12 @@ private function define_admin_hooks() { */ private function define_public_hooks() { - $plugin_public = new Visual_Composer_Multilanguage_Public( $this->get_plugin_name(), $this->get_version() ); + $plugin_public = new Wpbakery_Page_Builder_Multilanguage_Public( $this->get_plugin_name(), $this->get_version() ); $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' ); $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); - $this->loader->add_action( 'wp_loaded', $plugin_public, 'extend_visual_composer' ); + $this->loader->add_action( 'wp_loaded', $plugin_public, 'extend_wpbakery_page_builder' ); $this->loader->add_action( 'wp_footer', $plugin_public, 'add_language_switcher' ); $this->loader->add_action( 'wp_footer', $plugin_public, 'plugin_settings_passthrough' ); @@ -204,7 +204,7 @@ public function get_plugin_name() { * The reference to the class that orchestrates the hooks with the plugin. * * @since 1.0.0 - * @return Visual_Composer_Multilanguage_Loader Orchestrates the hooks of the plugin. + * @return Wpbakery_Page_Builder_Multilanguage_Loader Orchestrates the hooks of the plugin. */ public function get_loader() { return $this->loader; diff --git a/public/class-visual-composer-multilanguage-public.php b/public/class-visual-composer-multilanguage-public.php index 64eaa23..b8c0b71 100755 --- a/public/class-visual-composer-multilanguage-public.php +++ b/public/class-visual-composer-multilanguage-public.php @@ -6,8 +6,8 @@ * @link https://allurewebsolutions.com * @since 1.0.0 * - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/public + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/public */ /** @@ -16,11 +16,11 @@ * Defines the plugin name, version, and two examples hooks for how to * enqueue the admin-specific stylesheet and JavaScript. * - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/public + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/public * @author Allure Web Solutions */ -class Visual_Composer_Multilanguage_Public { +class Wpbakery_Page_Builder_Multilanguage_Public { /** * The ID of this plugin. @@ -66,15 +66,15 @@ public function enqueue_styles() { * This function is provided for demonstration purposes only. * * An instance of this class should be passed to the run() function - * defined in Visual_Composer_Multilanguage_Loader as all of the hooks are defined + * defined in Wpbakery_Page_Builder_Multilanguage_Loader as all of the hooks are defined * in that particular class. * - * The Visual_Composer_Multilanguage_Loader will then create the relationship + * The Wpbakery_Page_Builder_Multilanguage_Loader will then create the relationship * between the defined hooks and the functions defined in this * class. */ - wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/visual-composer-multilanguage-public.css', array(), $this->version, 'all' ); + wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpbakery-page-builder-multilanguage-public.css', array(), $this->version, 'all' ); } @@ -89,21 +89,21 @@ public function enqueue_scripts() { * This function is provided for demonstration purposes only. * * An instance of this class should be passed to the run() function - * defined in Visual_Composer_Multilanguage_Loader as all of the hooks are defined + * defined in Wpbakery_Page_Builder_Multilanguage_Loader as all of the hooks are defined * in that particular class. * - * The Visual_Composer_Multilanguage_Loader will then create the relationship + * The Wpbakery_Page_Builder_Multilanguage_Loader will then create the relationship * between the defined hooks and the functions defined in this * class. */ - wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/visual-composer-multilanguage-public.js', array( 'jquery' ), $this->version, false ); + wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpbakery-page-builder-multilanguage-public.js', array( 'jquery' ), $this->version, false ); wp_localize_script( $this->plugin_name, 'vc', array( 'pluginUrl' => plugin_dir_url( __FILE__ ), 'ajax_url' => admin_url( 'admin-ajax.php' ), 'siteUrl' => get_bloginfo( 'url' ), - 'defaultLanguage' => get_option( 'visual_composer_multilanguage_default_language' ), + 'defaultLanguage' => get_option( 'wpbakery_page_builder_multilanguage_default_language' ), ) ); } @@ -112,11 +112,11 @@ public function enqueue_scripts() { /** * Add data-lang attribute to VC Rows */ - public function extend_visual_composer() { + public function extend_wpbakery_page_builder() { // Get languages from plugin settings - $languages = explode( ',', str_replace( ' ', '', get_option( 'visual_composer_multilanguage_languages', 'English' ) ) ); + $languages = explode( ',', str_replace( ' ', '', get_option( 'wpbakery_page_builder_multilanguage_languages', 'English' ) ) ); - // Add language dropdown to visual composer settings + // Add language dropdown to wpbakery page builder settings if ( function_exists( 'vc_add_param' ) ) { vc_add_param( 'vc_row', array( 'type' => 'dropdown', @@ -137,8 +137,8 @@ public function extend_visual_composer() { * Add language switcher */ public function add_language_switcher() { - if ( get_option( 'visual_composer_multilanguage_switcher' ) === "switcher" ) { - $languages = explode( ',', str_replace( ' ', '', get_option( 'visual_composer_multilanguage_languages', 'English' ) ) ); + if ( get_option( 'wpbakery_page_builder_multilanguage_switcher' ) === "switcher" ) { + $languages = explode( ',', str_replace( ' ', '', get_option( 'wpbakery_page_builder_multilanguage_languages', 'English' ) ) ); $switcher_html = '

Change Language To: '; foreach ( $languages as $language ) { @@ -151,9 +151,9 @@ public function add_language_switcher() { } function plugin_settings_passthrough() { - $googleapikey = get_option( 'visual_composer_multilanguage_googleapikey' ); - $styling = get_option( 'visual_composer_multilanguage_styling' ); - $autotranslate = get_option( 'visual_composer_multilanguage_autotranslate' ); + $googleapikey = get_option( 'wpbakery_page_builder_multilanguage_googleapikey' ); + $styling = get_option( 'wpbakery_page_builder_multilanguage_styling' ); + $autotranslate = get_option( 'wpbakery_page_builder_multilanguage_autotranslate' ); echo '

'; } diff --git a/public/partials/visual-composer-multilanguage-public-display.php b/public/partials/visual-composer-multilanguage-public-display.php index e9234fb..5bc1cb1 100755 --- a/public/partials/visual-composer-multilanguage-public-display.php +++ b/public/partials/visual-composer-multilanguage-public-display.php @@ -8,8 +8,8 @@ * @link https://allurewebsolutions.com * @since 1.0.0 * - * @package Visual_Composer_Multilanguage - * @subpackage Visual_Composer_Multilanguage/public/partials + * @package Wpbakery_Page_Builder_Multilanguage + * @subpackage Wpbakery_Page_Builder_Multilanguage/public/partials */ ?> diff --git a/uninstall.php b/uninstall.php index 05d9a1e..b18120a 100755 --- a/uninstall.php +++ b/uninstall.php @@ -22,7 +22,7 @@ * @link https://allurewebsolutions.com * @since 1.0.0 * - * @package Visual_Composer_Multilanguage + * @package Wpbakery_Page_Builder_Multilanguage */ // If uninstall not called from WordPress, then exit. diff --git a/visual-composer-multilanguage.php b/visual-composer-multilanguage.php index 8b9e1e1..ee4e780 100755 --- a/visual-composer-multilanguage.php +++ b/visual-composer-multilanguage.php @@ -10,18 +10,18 @@ * * @link https://allurewebsolutions.com * @since 1.0.0 - * @package Visual_Composer_Multilanguage + * @package Wpbakery_Page_Builder_Multilanguage * * @wordpress-plugin * Plugin Name: WP Bakery Multilanguage - * Plugin URI: https://allurewebsolutions.com/projects/visual-composer-multilanguage + * Plugin URI: https://allurewebsolutions.com/projects/wpbakery-page-builder-multilanguage * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area. * Version: 2.1.2 * Author: Allure Web Solutions * Author URI: https://allurewebsolutions.com * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt - * Text Domain: visual-composer-multilanguage + * Text Domain: wpbakery-page-builder-multilanguage * Domain Path: /languages */ @@ -32,32 +32,32 @@ /** * The code that runs during plugin activation. - * This action is documented in includes/class-visual-composer-multilanguage-activator.php + * This action is documented in includes/class-wpbakery-page-builder-multilanguage-activator.php */ -function activate_visual_composer_multilanguage() +function activate_wpbakery_page_builder_multilanguage() { - require_once plugin_dir_path(__FILE__) . 'includes/class-visual-composer-multilanguage-activator.php'; - Visual_Composer_Multilanguage_Activator::activate(); + require_once plugin_dir_path(__FILE__) . 'includes/class-wpbakery-page-builder-multilanguage-activator.php'; + Wpbakery_Page_Builder_Multilanguage_Activator::activate(); } /** * The code that runs during plugin deactivation. - * This action is documented in includes/class-visual-composer-multilanguage-deactivator.php + * This action is documented in includes/class-wpbakery-page-builder-multilanguage-deactivator.php */ -function deactivate_visual_composer_multilanguage() +function deactivate_wpbakery_page_builder_multilanguage() { - require_once plugin_dir_path(__FILE__) . 'includes/class-visual-composer-multilanguage-deactivator.php'; - Visual_Composer_Multilanguage_Deactivator::deactivate(); + require_once plugin_dir_path(__FILE__) . 'includes/class-wpbakery-page-builder-multilanguage-deactivator.php'; + Wpbakery_Page_Builder_Multilanguage_Deactivator::deactivate(); } -register_activation_hook(__FILE__, 'activate_visual_composer_multilanguage'); -register_deactivation_hook(__FILE__, 'deactivate_visual_composer_multilanguage'); +register_activation_hook(__FILE__, 'activate_wpbakery_page_builder_multilanguage'); +register_deactivation_hook(__FILE__, 'deactivate_wpbakery_page_builder_multilanguage'); /** * The core plugin class that is used to define internationalization, * admin-specific hooks, and public-facing site hooks. */ -require plugin_dir_path(__FILE__) . 'includes/class-visual-composer-multilanguage.php'; +require plugin_dir_path(__FILE__) . 'includes/class-wpbakery-page-builder-multilanguage.php'; /** * Begins execution of the plugin. @@ -68,10 +68,10 @@ function deactivate_visual_composer_multilanguage() * * @since 1.0.0 */ -function run_visual_composer_multilanguage() +function run_wpbakery_page_builder_multilanguage() { - $plugin = new Visual_Composer_Multilanguage(); + $plugin = new Wpbakery_Page_Builder_Multilanguage(); $plugin->run(); } -run_visual_composer_multilanguage(); +run_wpbakery_page_builder_multilanguage(); From 22892e79d192e473dfc3c52d0fea924a2ffe204b Mon Sep 17 00:00:00 2001 From: Michael Makijenko Date: Thu, 28 Oct 2021 12:20:41 +0300 Subject: [PATCH 2/4] Update all vc appearances with wpb --- README.md | 2 +- README.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 01a3c91..ebe62ca 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # WP Bakery Multilanguage Author URI: https://allurewebsolutions.com -Plugin URI: https://vc-multilanguage.allureprojects.com/ +Plugin URI: https://wpb-multilanguage.allureprojects.com/ Tags: wpbakery page builder, multilanguage, multi-language, translate, translation Donate link: https://allurewebsolutions.com/product/donation Tested up to: 5.3 diff --git a/README.txt b/README.txt index 157bfaa..7c478d6 100755 --- a/README.txt +++ b/README.txt @@ -1,7 +1,7 @@ === WP Bakery Multilanguage === Contributors: allurewebsolutions Author URI: https://allurewebsolutions.com -Plugin URI: https://vc-multilanguage.allureprojects.com/ +Plugin URI: https://wpb-multilanguage.allureprojects.com/ Tags: wpbakery page builder, multilanguage, multi-language, translate, translation Donate link: https://allurewebsolutions.com/product/donation Tested up to: 5.8 From 0877eca7aed1d2741a60f0b18d9909b2affc0fff Mon Sep 17 00:00:00 2001 From: Michael Makijenko Date: Wed, 3 Nov 2021 13:04:12 +0200 Subject: [PATCH 3/4] file names updated to reflect changes in the code --- README.md | 2 +- README.txt | 4 ++-- ...hp => class-wpbakery-page-builder-multilanguage-admin.php} | 0 ...dmin.css => wpbakery-page-builder-multilanguage-admin.css} | 0 ...-admin.js => wpbakery-page-builder-multilanguage-admin.js} | 0 ... => wpbakery-page-builder-multilanguage-admin-display.php} | 0 ...> class-wpbakery-page-builder-multilanguage-activator.php} | 0 ...class-wpbakery-page-builder-multilanguage-deactivator.php} | 0 ...php => class-wpbakery-page-builder-multilanguage-i18n.php} | 0 ...p => class-wpbakery-page-builder-multilanguage-loader.php} | 0 ...uage.php => class-wpbakery-page-builder-multilanguage.php} | 0 ...p => class-wpbakery-page-builder-multilanguage-public.php} | 0 ...lic.css => wpbakery-page-builder-multilanguage-public.css} | 0 ...ublic.js => wpbakery-page-builder-multilanguage-public.js} | 0 ...=> wpbakery-page-builder-multilanguage-public-display.php} | 0 15 files changed, 3 insertions(+), 3 deletions(-) rename admin/{class-visual-composer-multilanguage-admin.php => class-wpbakery-page-builder-multilanguage-admin.php} (100%) rename admin/css/{visual-composer-multilanguage-admin.css => wpbakery-page-builder-multilanguage-admin.css} (100%) rename admin/js/{visual-composer-multilanguage-admin.js => wpbakery-page-builder-multilanguage-admin.js} (100%) rename admin/partials/{visual-composer-multilanguage-admin-display.php => wpbakery-page-builder-multilanguage-admin-display.php} (100%) rename includes/{class-visual-composer-multilanguage-activator.php => class-wpbakery-page-builder-multilanguage-activator.php} (100%) rename includes/{class-visual-composer-multilanguage-deactivator.php => class-wpbakery-page-builder-multilanguage-deactivator.php} (100%) rename includes/{class-visual-composer-multilanguage-i18n.php => class-wpbakery-page-builder-multilanguage-i18n.php} (100%) rename includes/{class-visual-composer-multilanguage-loader.php => class-wpbakery-page-builder-multilanguage-loader.php} (100%) rename includes/{class-visual-composer-multilanguage.php => class-wpbakery-page-builder-multilanguage.php} (100%) rename public/{class-visual-composer-multilanguage-public.php => class-wpbakery-page-builder-multilanguage-public.php} (100%) rename public/css/{visual-composer-multilanguage-public.css => wpbakery-page-builder-multilanguage-public.css} (100%) rename public/js/{visual-composer-multilanguage-public.js => wpbakery-page-builder-multilanguage-public.js} (100%) rename public/partials/{visual-composer-multilanguage-public-display.php => wpbakery-page-builder-multilanguage-public-display.php} (100%) diff --git a/README.md b/README.md index ebe62ca..589c3c7 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ In version 2.0, we've added support for automatic translations using the Google [Full Setup Instructions & Walkthrough](https://allurewebsolutions.com/wpbakery-page-builder-multilanguage-plugin) -[Demo](https://wpb-multilanguage.allureprojects.com) +[Demo](https://vc-multilanguage.allureprojects.com) ## Installation diff --git a/README.txt b/README.txt index 7c478d6..55385dd 100755 --- a/README.txt +++ b/README.txt @@ -1,7 +1,7 @@ === WP Bakery Multilanguage === Contributors: allurewebsolutions Author URI: https://allurewebsolutions.com -Plugin URI: https://wpb-multilanguage.allureprojects.com/ +Plugin URI: https://vc-multilanguage.allureprojects.com/ Tags: wpbakery page builder, multilanguage, multi-language, translate, translation Donate link: https://allurewebsolutions.com/product/donation Tested up to: 5.8 @@ -16,7 +16,7 @@ In version 2.0, we've added support for automatic translations using the Google [Full Setup Instructions & Walkthrough](https://allurewebsolutions.com/wpbakery-page-builder-multilanguage-plugin) -[Demo](https://wpb-multilanguage.allureprojects.com) +[Demo](https://vc-multilanguage.allureprojects.com) == Installation == 1) Activate the plugin. Must have WPBakery Page Builder also activated. diff --git a/admin/class-visual-composer-multilanguage-admin.php b/admin/class-wpbakery-page-builder-multilanguage-admin.php similarity index 100% rename from admin/class-visual-composer-multilanguage-admin.php rename to admin/class-wpbakery-page-builder-multilanguage-admin.php diff --git a/admin/css/visual-composer-multilanguage-admin.css b/admin/css/wpbakery-page-builder-multilanguage-admin.css similarity index 100% rename from admin/css/visual-composer-multilanguage-admin.css rename to admin/css/wpbakery-page-builder-multilanguage-admin.css diff --git a/admin/js/visual-composer-multilanguage-admin.js b/admin/js/wpbakery-page-builder-multilanguage-admin.js similarity index 100% rename from admin/js/visual-composer-multilanguage-admin.js rename to admin/js/wpbakery-page-builder-multilanguage-admin.js diff --git a/admin/partials/visual-composer-multilanguage-admin-display.php b/admin/partials/wpbakery-page-builder-multilanguage-admin-display.php similarity index 100% rename from admin/partials/visual-composer-multilanguage-admin-display.php rename to admin/partials/wpbakery-page-builder-multilanguage-admin-display.php diff --git a/includes/class-visual-composer-multilanguage-activator.php b/includes/class-wpbakery-page-builder-multilanguage-activator.php similarity index 100% rename from includes/class-visual-composer-multilanguage-activator.php rename to includes/class-wpbakery-page-builder-multilanguage-activator.php diff --git a/includes/class-visual-composer-multilanguage-deactivator.php b/includes/class-wpbakery-page-builder-multilanguage-deactivator.php similarity index 100% rename from includes/class-visual-composer-multilanguage-deactivator.php rename to includes/class-wpbakery-page-builder-multilanguage-deactivator.php diff --git a/includes/class-visual-composer-multilanguage-i18n.php b/includes/class-wpbakery-page-builder-multilanguage-i18n.php similarity index 100% rename from includes/class-visual-composer-multilanguage-i18n.php rename to includes/class-wpbakery-page-builder-multilanguage-i18n.php diff --git a/includes/class-visual-composer-multilanguage-loader.php b/includes/class-wpbakery-page-builder-multilanguage-loader.php similarity index 100% rename from includes/class-visual-composer-multilanguage-loader.php rename to includes/class-wpbakery-page-builder-multilanguage-loader.php diff --git a/includes/class-visual-composer-multilanguage.php b/includes/class-wpbakery-page-builder-multilanguage.php similarity index 100% rename from includes/class-visual-composer-multilanguage.php rename to includes/class-wpbakery-page-builder-multilanguage.php diff --git a/public/class-visual-composer-multilanguage-public.php b/public/class-wpbakery-page-builder-multilanguage-public.php similarity index 100% rename from public/class-visual-composer-multilanguage-public.php rename to public/class-wpbakery-page-builder-multilanguage-public.php diff --git a/public/css/visual-composer-multilanguage-public.css b/public/css/wpbakery-page-builder-multilanguage-public.css similarity index 100% rename from public/css/visual-composer-multilanguage-public.css rename to public/css/wpbakery-page-builder-multilanguage-public.css diff --git a/public/js/visual-composer-multilanguage-public.js b/public/js/wpbakery-page-builder-multilanguage-public.js similarity index 100% rename from public/js/visual-composer-multilanguage-public.js rename to public/js/wpbakery-page-builder-multilanguage-public.js diff --git a/public/partials/visual-composer-multilanguage-public-display.php b/public/partials/wpbakery-page-builder-multilanguage-public-display.php similarity index 100% rename from public/partials/visual-composer-multilanguage-public-display.php rename to public/partials/wpbakery-page-builder-multilanguage-public-display.php From d71a74a4ee701a8feb57d75aa4b3669445224472 Mon Sep 17 00:00:00 2001 From: Michael Makijenko Date: Wed, 3 Nov 2021 13:39:38 +0200 Subject: [PATCH 4/4] change versions --- README.md | 4 ++-- README.txt | 4 ++-- visual-composer-multilanguage.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 589c3c7..c7f272f 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ Author URI: https://allurewebsolutions.com Plugin URI: https://wpb-multilanguage.allureprojects.com/ Tags: wpbakery page builder, multilanguage, multi-language, translate, translation Donate link: https://allurewebsolutions.com/product/donation -Tested up to: 5.3 -Stable tag: 2.1.2 +Tested up to: 5.8.1 +Stable tag: 3.0.0 This is an add-on plugin for WPBakery Page Builder that adds multilanguage support and functionality. Version 2.0 now also has automatic translations that you can turn on. diff --git a/README.txt b/README.txt index 55385dd..6b02ce9 100755 --- a/README.txt +++ b/README.txt @@ -4,8 +4,8 @@ Author URI: https://allurewebsolutions.com Plugin URI: https://vc-multilanguage.allureprojects.com/ Tags: wpbakery page builder, multilanguage, multi-language, translate, translation Donate link: https://allurewebsolutions.com/product/donation -Tested up to: 5.8 -Stable tag: 2.1.2 +Tested up to: 5.8.1 +Stable tag: 3.0.0 This is an add-on plugin for WPBakery Page Builder that adds multilanguage support and functionality. Version 2.0 now also has automatic translations that you can turn on. diff --git a/visual-composer-multilanguage.php b/visual-composer-multilanguage.php index ee4e780..7833409 100755 --- a/visual-composer-multilanguage.php +++ b/visual-composer-multilanguage.php @@ -16,7 +16,7 @@ * Plugin Name: WP Bakery Multilanguage * Plugin URI: https://allurewebsolutions.com/projects/wpbakery-page-builder-multilanguage * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area. - * Version: 2.1.2 + * Version: 3.0.0 * Author: Allure Web Solutions * Author URI: https://allurewebsolutions.com * License: GPL-2.0+