AnyWhere Elementor - Version 1.1

Version Description

= * Option to view and copy shortcode from All Template view (without opening template to edit.).

=

Download this release

Release Info

Developer wpvibes
Plugin Icon 128x128 AnyWhere Elementor
Version 1.1
Comparing to
See all releases

Version 1.1

anywhere-elementor.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: Anywhere Elementor
4
+ * Description: Allows you to insert elementor pages and library templates anywhere using shortcodes.
5
+ * Plugin URI: http://www.elementoraddons.com/
6
+ * Author: WPVibes
7
+ * Version: 1.1
8
+ * Author URI: http://wpvibes.com/
9
+ * Text Domain: wts_ae
10
+ *
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
+
15
+ define( 'AE_VERSION', '0.5' );
16
+
17
+ define( 'WTS_AE__FILE__', __FILE__ );
18
+ define( 'WTS_AE_PLUGIN_BASE', plugin_basename( WTS_AE__FILE__ ) );
19
+ define( 'WTS_AE_URL', plugins_url( '/', WTS_AE__FILE__ ) );
20
+ define( 'WTS_AE_PATH', plugin_dir_path( WTS_AE__FILE__ ) );
21
+ define( 'WTS_AE_ASSETS_URL', WTS_AE_URL . 'includes/assets/' );
22
+
23
+ add_action( 'plugins_loaded', 'wts_ae_load_plugin_textdomain' );
24
+
25
+
26
+ require_once( WTS_AE_PATH . 'includes/post-type.php' );
27
+ require_once( WTS_AE_PATH . 'includes/meta-box.php' );
28
+ require_once( WTS_AE_PATH . 'includes/bootstrap.php' );
29
+
30
+
31
+ /**
32
+ * Load gettext translate for our text domain.
33
+ */
34
+ function WTS_AE_load_plugin_textdomain(){
35
+ load_plugin_textdomain( 'wts_ae' );
36
+ }
37
+
38
+
39
+ function wts_ae_styles_method() {
40
+ $custom_css = "<style type='text/css'> .ae_data .elementor-editor-element-setting {
41
+ display:none !important;
42
+ }
43
+ </style>";
44
+ echo $custom_css;
45
+ }
46
+ add_action( 'wp_head', 'wts_ae_styles_method' );
47
+ function set_custom_edit_ae_global_templates_posts_columns($columns) {
48
+ //unset( $columns['author'] );
49
+ $columns['ae_shortcode_column'] = __( 'Shortcode', 'wts_ae' );
50
+ return $columns;
51
+ }
52
+ function add_ae_global_templates_columns( $column, $post_id ) {
53
+
54
+ switch ( $column ) {
55
+
56
+ case 'ae_shortcode_column' :
57
+ echo '<input type=\'text\' class=\'widefat\' value=\'[INSERT_ELEMENTOR id="'.$post_id.'"]\' readonly="">';
58
+ break;
59
+ }
60
+ }
61
+ add_filter( 'manage_ae_global_templates_posts_columns', 'set_custom_edit_ae_global_templates_posts_columns' );
62
+ add_action( 'manage_ae_global_templates_posts_custom_column' , 'add_ae_global_templates_columns', 10, 2 );
includes/bootstrap.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Elementor;
3
+
4
+ function wts_insert_elementor($atts){
5
+ if(!class_exists('Elementor\Plugin')){
6
+ return '';
7
+ }
8
+ if(!isset($atts['id']) || empty($atts['id'])){
9
+ return '';
10
+ }
11
+
12
+ $post_id = $atts['id'];
13
+ $response = Plugin::instance()->frontend->get_builder_content_for_display($post_id);
14
+ return $response;
15
+ }
16
+ add_shortcode('INSERT_ELEMENTOR','Elementor\wts_insert_elementor');
17
+
18
+
19
+ function enable_elementor(){
20
+ add_post_type_support( 'ae_global_templates', 'elementor' );
21
+ }
22
+ add_action('elementor/init','Elementor\enable_elementor');
23
+
24
+
25
+ function print_ae_data($sections){
26
+ foreach ( $sections as $section_data ) {
27
+ $section = new Element_Section( $section_data );
28
+
29
+ $section->print_element();
30
+ }
31
+ }
32
+ /**
33
+ * Enable the use of shortcodes in text widgets.
34
+ */
35
+ add_filter( 'widget_text', 'do_shortcode' );
36
+
37
+
38
+ function ae_plugin_action_links($links){
39
+ $links['go_pro'] = '<a style="color:green;" title="Upgrade to Pro" href="https://www.elementoraddons.com/anywhere-elementor-pro/?utm_source=gopro&utm_medium=web&utm_campaign=ae" target="_blank"><b>Go Pro</b></a>';
40
+ return $links;
41
+ }
42
+ add_filter( 'plugin_action_links_' . WTS_AE_PLUGIN_BASE, 'Elementor\ae_plugin_action_links' );
includes/meta-box.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ function add_ae_meta_box(){
5
+ add_meta_box('ae-shortcode-box','Anywhere Elementor Usage','ae_shortcode_box','ae_global_templates','side','high');
6
+ }
7
+ add_action("add_meta_boxes", "add_ae_meta_box");
8
+
9
+
10
+ function ae_shortcode_box($post){
11
+ ?>
12
+ <h4 style="margin-bottom:5px;">Shortcode</h4>
13
+ <input type='text' class='widefat' value='[INSERT_ELEMENTOR id="<?php echo $post->ID; ?>"]' readonly="">
14
+
15
+ <h4 style="margin-bottom:5px;">Php Code</h4>
16
+ <input type='text' class='widefat' value="&lt;?php echo do_shortcode('[INSERT_ELEMENTOR id=&quot;<?php echo $post->ID; ?>&quot;]'); ?&gt;" readonly="">
17
+ <?php
18
+ }
includes/post-type.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // No direct access, please
3
+ if ( ! defined( 'ABSPATH' ) ) exit;
4
+
5
+ if ( ! function_exists( 'wts_ae_post_type' ) ) :
6
+ /**
7
+ * Create our WP Show Posts post type
8
+ * @since 0.1
9
+ */
10
+ add_action( 'init', 'wts_ae_post_type', 0 );
11
+ function wts_ae_post_type() {
12
+
13
+ $labels = array(
14
+ 'name' => _x( 'AE Global Templates', 'Post Type General Name', 'wts_ae' ),
15
+ 'singular_name' => _x( 'AE Template', 'Post Type Singular Name', 'wts_ae' ),
16
+ 'menu_name' => __( 'AE Templates', 'wts_ae' ),
17
+ 'name_admin_bar' => __( 'AE Templates', 'wts_ae' ),
18
+ 'archives' => __( 'List Archives', 'wts_ae' ),
19
+ 'parent_item_colon' => __( 'Parent List:', 'wts_ae' ),
20
+ 'all_items' => __( 'All AE Templates', 'wts_ae' ),
21
+ 'add_new_item' => __( 'Add New AE Template', 'wts_ae' ),
22
+ 'add_new' => __( 'Add New', 'wts_ae' ),
23
+ 'new_item' => __( 'New AE Template', 'wts_ae' ),
24
+ 'edit_item' => __( 'Edit AE Template', 'wts_ae' ),
25
+ 'update_item' => __( 'Update AE Template', 'wts_ae' ),
26
+ 'view_item' => __( 'View AE Template', 'wts_ae' ),
27
+ 'search_items' => __( 'Search AE Template', 'wts_ae' ),
28
+ 'not_found' => __( 'Not found', 'wts_ae' ),
29
+ 'not_found_in_trash' => __( 'Not found in Trash', 'wts_ae' )
30
+ );
31
+ $args = array(
32
+ 'label' => __( 'Post List', 'wts_ae' ),
33
+ 'labels' => $labels,
34
+ 'supports' => array( 'title','editor' ),
35
+ 'public' => true,
36
+ 'rewrite' => false,
37
+ 'show_ui' => true,
38
+ 'show_in_menu' => true,
39
+ 'show_in_nav_menus' => false,
40
+ 'exclude_from_search' => true,
41
+ 'capability_type' => 'post',
42
+ 'hierarchical' => false,
43
+ 'menu-icon' => 'dashicon-move'
44
+ );
45
+ register_post_type( 'ae_global_templates', $args );
46
+
47
+ }
48
+ endif;
readme.txt ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === AnyWhere Elementor ===
2
+ Contributors: wpvibes, webtechstreet, tejwanihemant
3
+ Tags: page-builder, elementor
4
+ Requires at least: 4.4
5
+ Tested up to: 5.2.2
6
+ Stable tag: 4.9
7
+ License: GPLv2 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+ Insert Elementor created content anywhere using shortcode.
11
+
12
+ Insert Elementor created content anywhere using shortcode.
13
+
14
+ == Description ==
15
+
16
+ Allows you to insert elementor pages,library templates and global templates anywhere using shortcodes.
17
+ Now create global elementor sections. Change at one place and reflect everywhere.
18
+
19
+ Use shortcode INSERT_ELEMENTOR eg: [INSERT_ELEMENTOR id=xxx]
20
+
21
+ Parameter "xxx" is id of any post created using Elementor.
22
+
23
+ For you convenience and separate management of Global Templates thee is also a custom post type.
24
+ Go to "AE Templates" from admin side navigation.
25
+
26
+ = Go Pro =
27
+ Checkout Pro version **[AnyWhere Elementor Pro](http://bit.ly/2QisWlt)** of this plugin that provides a lot more functionality.
28
+ - Global Post Layouts
29
+ - Post Archive Templates
30
+ - Category,Tag Templates
31
+ - WooCommerce Product & Category Layouts
32
+ - Global layouts for Custom Post Types and Custom Taxonomies
33
+ - Support for Custom Fields
34
+ - Design 404 Pages
35
+ - Design Search Page layouts.
36
+
37
+ For more details and demo check our official site http://www.elementoraddons.com/
38
+
39
+ Note: This plugin is an addon of Elementor Page Builder (https://wordpress.org/plugins/elementor/) and will only work with Elementor Page Builder installed.
40
+
41
+
42
+ == Installation ==
43
+
44
+ 1. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly.
45
+ 2. Activate the plugin through the 'Plugins' screen in WordPress
46
+
47
+
48
+ == Changelog ==
49
+
50
+ == 1.1 ==
51
+ * Option to view and copy shortcode from All Template view (without opening template to edit.).
52
+
53
+ == 1.0 ==
54
+ * Updated compatibility with latest version of WordPress and Elementor
55
+
56
+ == 0.5 ==
57
+ * Compatibility with Elementor 1.5
58
+
59
+
60
+ = 0.4 =
61
+ * Fixed issues after recent elementor updates.
62
+
63
+
64
+ = 0.3 =
65
+ * Added Custom Post Type for Global Templates.
66
+ * Fixed overlay issue.
67
+
68
+
69
+ = 0.2 =
70
+ * Compatibility fix with Generatepress hooks
71
+ * Enable shortcode to work ien widgets
72
+
73
+ = 0.1 =
74
+ * Plugin initial release