PluginProbe
Eleblog – Elementor Blog And Magazine Addons / 1.9
Eleblog – Elementor Blog And Magazine Addons v1.9
1.9 trunk
ele-blog / ele-blog.php

ele-blog.php in Eleblog – Elementor Blog And Magazine Addons 1.9, at ele-blog.php

106 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Ele Blog
5 *
6 * @package ele-blog
7 * @author SolverWP
8 * @copyright 2023 solverwp
9 * @license GPL-2.0-or-later
10 *
11 * Plugin Name: Eleblog - Elementor Blog And Magazine Addons
12 * Plugin URI: https://wordpress.org/plugins/ele-blog
13 * Description: Ele blog is an ultimate posts addon or element pack for the Elementor page builder. You can display the blog posts on the WordPress web site the way you want.
14 * Version: 1.9
15 * Author: smarettheme
16 * Author URI: https://profiles.wordpress.org/smarettheme/
17 * Text Domain: ele-blog
18 * License: GPL v2 or later
19 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
20 *
21 */
22
23
24 if (!defined('ABSPATH')) {
25 die;
26 }
27
28 if (function_exists('eleblog_dynamic_styles')) {
29 return;
30 }
31
32
33 /*
34 * Define Plugin Dir Path
35 * @since 1.0.0
36 * */
37 define('ELE_BLOG_ROOT_PATH', plugin_dir_path(__FILE__));
38 define('ELE_BLOG_ROOT_URL', plugin_dir_url(__FILE__));
39 define('ELE_BLOG_INC', ELE_BLOG_ROOT_PATH . '/inc');
40 define('ELE_BLOG_CSS', ELE_BLOG_ROOT_URL . 'assets/css');
41 define('ELE_BLOG_JS', ELE_BLOG_ROOT_URL . 'assets/js');
42 define('ELE_BLOG_ELEMENTOR', ELE_BLOG_ROOT_PATH . '/elementor');
43
44
45 /** Plugin version **/
46 define('ELE_BLOG_VERSION', '1.9');
47
48
49 /*
50 * require file
51 */
52
53 if (file_exists(ELE_BLOG_INC . '/class-ele-blog-init.php')) {
54 require_once ELE_BLOG_INC . '/class-ele-blog-init.php';
55 }
56
57 add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'eleblog_pro_link');
58 function eleblog_pro_link($links)
59 {
60 $links[] = '<a target="_blank" href="https://1.envato.market/ele-blog">Go Pro</a>';
61 return $links;
62 }
63
64
65 function eleblog_quick_feedback_init()
66 {
67 if (is_admin()) {
68 $eleblog_feedback = new Eleblog_Quck_Feedback(
69 __FILE__,
70 'solverwp21@gmail.com',
71 false,
72 true
73 );
74 }
75 }
76 add_action('plugins_loaded', 'eleblog_quick_feedback_init');
77
78
79 register_activation_hook(__FILE__, 'eleblog_activation');
80
81
82 function eleblog_activation()
83 {
84 update_option("eleblog_active_date", gmdate('Y-m-d H:i:s'));
85 }
86
87
88 function eleblog_swp_notice()
89 {
90 $user_id = get_current_user_id();
91 if (!get_user_meta($user_id, 'swp_eleblog_notice_dismissed')) {
92 $dismiss_url = wp_nonce_url(add_query_arg('swp_eleblog-dismissed', '1'), 'eleblog_swp_dismiss_' . $user_id);
93 echo '<div class="notice-success notice"><h3><a target="_blank" style="text-decoration: none;line-height: 20px;color: #3c434a;font-size:13px" href="https://1.envato.market/ele-blog" >Go Pro <span style="font-size:15px;color:blue; text-decoration:underline">$16.50</span></a><a style="text-decoration:none;float:right" href="' . esc_url($dismiss_url) . '"><span class="dashicons dashicons-no"></span></a></h3></div>';
94 }
95 }
96 add_action('admin_notices', 'eleblog_swp_notice');
97
98 function eleblog_swp_notice_dismissed()
99 {
100 $user_id = get_current_user_id();
101 if (isset($_GET['swp_eleblog-dismissed']) && isset($_GET['_wpnonce']) && wp_verify_nonce(sanitize_key($_GET['_wpnonce']), 'eleblog_swp_dismiss_' . $user_id)) {
102 add_user_meta($user_id, 'swp_eleblog_notice_dismissed', 'true', true);
103 }
104 }
105 add_action('admin_init', 'eleblog_swp_notice_dismissed');
106