PluginProbe
PowerFolio – Portfolio & Image Gallery for Elementor / 3.2.5
PowerFolio – Portfolio & Image Gallery for Elementor v3.2.5
trunk 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.7
portfolio-elementor / portfolio-elementor.php

portfolio-elementor.php in PowerFolio – Portfolio & Image Gallery for Elementor 3.2.5, at portfolio-elementor.php

164 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 Plugin Name: PowerFolio - Portfolio & Image Gallery for Elementor
5 Plugin URI: https://powerfoliowp.com
6 Description: Create portfolios and image galleries in seconds using Elementor, Gutenberg blocks, or any page builder!
7 Author: PWR Plugins
8 Author URI: https://dotrex.co
9 Text Domain: portfolio-elementor
10 Domain Path: /languages
11 Version: 3.2.5
12 License: GPL v2 or later
13 License URI: https://www.gnu.org/licenses/gpl-2.0.html
14 */
15 // Exit if accessed directly
16 if ( !defined( 'ABSPATH' ) ) {
17 exit;
18 }
19 //Freemius
20 if ( function_exists( 'pe_fs' ) ) {
21 pe_fs()->set_basename( false, __FILE__ );
22 } else {
23 // DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE `function_exists` CALL ABOVE TO PROPERLY WORK.
24 if ( !function_exists( 'pe_fs' ) ) {
25 // Create a helper function for easy SDK access.
26 function pe_fs() {
27 global $pe_fs;
28 if ( !isset( $pe_fs ) ) {
29 // Include Composer autoloader
30 require_once dirname( __FILE__ ) . '/vendor/autoload.php';
31 $pe_fs = fs_dynamic_init( array(
32 'id' => '7226',
33 'slug' => 'portfolio-elementor',
34 'premium_slug' => 'portfolio-elementor-pro',
35 'type' => 'plugin',
36 'public_key' => 'pk_75702ac7c5c10d2bfd4880c1c8039',
37 'is_premium' => false,
38 'premium_suffix' => 'PRO',
39 'has_addons' => false,
40 'has_paid_plans' => true,
41 'menu' => array(
42 'slug' => 'elementor_portfolio',
43 'first-path' => 'admin.php?page=elementor_portfolio',
44 ),
45 'is_live' => true,
46 ) );
47 }
48 return $pe_fs;
49 }
50
51 // Init Freemius.
52 pe_fs();
53 // Signal that SDK was initiated.
54 do_action( 'pe_fs_loaded' );
55 }
56 // ... Your plugin's main file logic ...
57 if ( !class_exists( 'Powerfolio_Portfolio' ) ) {
58 /*
59 * Start Powerfolio
60 */
61 /*
62 * Portfolio
63 */
64 require 'classes/Powerfolio_Portfolio.php';
65 /*
66 * Image Gallery
67 */
68 require 'classes/Powerfolio_Image_Gallery.php';
69 /*
70 Portfolio Carousel
71 */
72 require 'classes/Powerfolio_Carousel.php';
73 /*
74 Powerfolio Post Grid
75 */
76 require 'classes/Powerfolio_Post_Grid.php';
77 /*
78 Powerfolio Product Grid
79 */
80 require 'classes/Powerfolio_Product_Grid.php';
81 /*
82 * Common Settings for Widgets
83 */
84 require 'classes/Powerfolio_Common_Settings.php';
85 /*
86 * Elementor
87 */
88 require 'elementor/load_elementor.php';
89 /*
90 * Gutenberg
91 */
92 require 'classes/Powerfolio_Gutenberg.php';
93 /*
94 * Shortcode Generator
95 */
96 require 'classes/Powerfolio_Shortcode_Generator.php';
97 /*
98 * Plugin Options
99 */
100 require 'includes/panel.php';
101 /*
102 * Plugin Functions
103 */
104 require 'includes/functions.php';
105 /*
106 * Review
107 */
108 update_option( "elpt-installDate", gmdate( 'Y-m-d H:i:s' ) );
109 if ( is_admin() ) {
110 require_once 'classes/Powerfolio_Feedback_Notice.php';
111 }
112 }
113 //Elementor Category
114 if ( !function_exists( 'elpug_powerups_cat' ) ) {
115 //Create Elementor Category
116 function elpug_powerups_cat() {
117 \Elementor\Plugin::$instance->elements_manager->add_category( 'elpug-elements', [
118 'title' => __( 'Powerfolio / Power-Ups for Elementor', 'portfolio-elementor' ),
119 'icon' => 'fa fa-plug',
120 ], 2 );
121 }
122
123 add_action( 'elementor/init', 'elpug_powerups_cat' );
124 }
125 //Post Grids Module
126 if ( !class_exists( 'PWGD_Register_PwrGrids_Elementor' ) ) {
127 //require 'modules/post-grid-module/post-grid-module.php';
128 }
129 register_activation_hook( __FILE__, 'elpt_activate' );
130 }
131 // Enqueue general scripts
132 /*if (! function_exists('powerfolio_enqueue_scripts')) {
133 function powerfolio_enqueue_scripts() {
134 //wp_enqueue_script( 'powerfolio-bundle-js', plugin_dir_url( __FILE__ ) . 'dist/bundle.js', array(), '1.0', true );
135 }
136 add_action( 'wp_enqueue_scripts', 'powerfolio_enqueue_scripts' );
137 }*/
138 //Workaround for Packery mode in some themes
139 if ( !function_exists( 'elpt_fix_packery_layout_themes' ) ) {
140 function elpt_fix_packery_layout_themes() {
141 wp_enqueue_script(
142 'jquery-packery2',
143 plugin_dir_url( __FILE__ ) . 'vendor/isotope/js/packery-mode.pkgd.min.js',
144 array('jquery', 'imagesloaded'),
145 '3.0.6',
146 true
147 );
148 }
149
150 add_action( 'init', function () {
151 $current_theme = wp_get_theme();
152 if ( $current_theme == 'Betheme' || $current_theme == 'OceanWP' ) {
153 add_action( 'wp_enqueue_scripts', 'elpt_fix_packery_layout_themes', 99999 );
154 }
155 } );
156 }
157 //load textdomain
158 if ( !function_exists( 'portfolio_elementor_load_textdomain' ) ) {
159 function portfolio_elementor_load_textdomain() {
160 load_plugin_textdomain( 'portfolio-elementor', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
161 }
162
163 add_action( 'plugins_loaded', 'portfolio_elementor_load_textdomain' );
164 }