PluginProbe
If-So Dynamic Content – Elementor & All Page Builders Personalization / 1.9.6
If-So Dynamic Content – Elementor & All Page Builders Personalization v1.9.6
1.10.1 1.10.0.1 1.10 1.9.9 1.9.2.2 1.9.3 1.9.3.1 1.9.3.2 1.9.4 1.9.4.1 1.9.5 1.9.5.1 1.9.6 1.9.7 1.9.8 trunk 0.1 1.0 1.0.1 1.0.2 1.0.3 1.0.5 1.0.6 1.0.7 1.0.8 All 100 releases
if-so / if-so.php

if-so.php in If-So Dynamic Content – Elementor & All Page Builders Personalization 1.9.6, at if-so.php

96 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 ob_start();
3 /**
4 * The plugin bootstrap file
5 *
6 * This file is read by WordPress to generate the plugin information in the plugin
7 * admin area. This file also includes all of the dependencies used by the plugin,
8 * registers the activation and deactivation functions, and defines a function
9 * that starts the plugin.
10 *
11 * @link https://www.if-so.com/
12 * @since 1.0.0
13 * @package IfSo
14 *
15 * @wordpress-plugin
16 * Plugin Name: If-So
17 * Plugin URI: https://www.if-so.com/
18 * Description: Display different content to different visitors. Simple to use, just select a condition and set content accordingly.
19 * Version: 1.9.6
20 * Author: If So Plugin
21 * Author URI: https://www.if-so.com/
22 * License: GPL-2.0+
23 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
24 * Text Domain: if-so
25 * Domain Path: /languages
26 */
27 // If this file is called directly, abort.
28 if ( ! defined( 'WPINC' ) ) {
29 die;
30 }
31 /**
32 * The code that runs during plugin activation.
33 * This action is documented in includes/class-if-so-activator.php
34 */
35 function activate_if_so() {
36 require_once plugin_dir_path( __FILE__ ) . 'includes/class-if-so-activator.php';
37 If_So_Activator::activate();
38 create_ifso_tables();
39 }
40 /**
41 * The code that runs during plugin deactivation.
42 * This action is documented in includes/class-if-so-deactivator.php
43 */
44 function deactivate_if_so() {
45 require_once plugin_dir_path( __FILE__ ) . 'includes/class-if-so-deactivator.php';
46 If_So_Deactivator::deactivate();
47 }
48 function uninstall_if_so() {
49 //Actual uninstall routine is located in uninstall.php
50 //require_once plugin_dir_path( __FILE__ ) . 'includes/class-if-so-uninstall.php';
51 //If_So_Uninstall::uninstall();
52 }
53 function create_ifso_tables() {
54 require_once plugin_dir_path( __FILE__ ) . 'extensions/ifso-tables/ifso-table-creator.php';
55 }
56 register_activation_hook( __FILE__, 'activate_if_so' );
57 register_deactivation_hook( __FILE__, 'deactivate_if_so' );
58 register_uninstall_hook(__FILE__, 'uninstall_if_so');
59 /**
60 * The core plugin class that is used to define internationalization,
61 * admin-specific hooks, and public-facing site hooks.
62 */
63 require plugin_dir_path( __FILE__ ) . 'includes/class-if-so.php';
64 /**
65 * Begins execution of the plugin.
66 *
67 * Since everything within the plugin is registered via hooks,
68 * then kicking off the plugin from this point in the file does
69 * not affect the page life cycle.
70 *
71 * @since 1.0.0
72 */
73 function run_if_so_plugin() {
74 $plugin = new If_So();
75 $plugin->run();
76 }
77 run_if_so_plugin();
78 // wrap function for do_shortcode
79 function ifso($id,$atts=null,$return=false) {
80 $atts_str = '';
81 if(!empty($atts) && is_array($atts)){
82 foreach ($atts as $key=>$val){
83 $atts_str.= "{$key}='{$val}' ";
84 }
85 }
86 $shortcode = sprintf( '[ifso id="%1$d" %2$s]', $id,$atts_str);
87
88 if($return)
89 return $shortcode;
90 else
91 echo do_shortcode($shortcode);
92 }
93 //Create If-So tables
94 register_activation_hook( __FILE__, 'ifso_jal_install' );
95
96