Plugin Directory

Changeset 3241023


Ignore:
Timestamp:
02/15/2025 04:03:45 PM (12 months ago)
Author:
wizz99
Message:

Rollback in order to correct functionality.

Location:
socialproofus/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • socialproofus/trunk/includes/socailpu-functions.php

    r3241020 r3241023  
    11<?php
     2/*
    23/**
    34 SocialProofus
    45*/
     6if (!defined('ABSPATH')) {
     7    die;
     8}
    59
    6 if (!defined('ABSPATH')) {
    7     exit; // Prevent direct access
     10/** constants */
     11class SPUPConstants
     12{
     13    public static function options_group()
     14    {
     15        return 'socailpu_options';
     16    }
     17
     18    public static function option_debug_key() {
     19        return 'ps_debug';
     20    }
     21
     22    public static function host() {
     23        return 'https://socialproofus.com';
     24    }
     25
     26    public static function version() {
     27        return '1.0.9';
     28    }
     29}
     30
     31define('SPUS_VERSION', 'v1.0.9');
     32define('SPUS_WEBSITE', 'https://socialproofus.com');
     33
     34
     35/* hooks */
     36add_action( 'admin_menu', 'socailpu_admin_menu' );
     37add_action( 'admin_init', 'socialproofus_init' ); //2.5.0
     38add_action('admin_notices', 'socailpu_admin_notice_html'); //3.1.0
     39add_action('wp_head', 'socailpu_inject_code'); //1.2.0
     40register_uninstall_hook(__FILE__, 'socailpu_uninstall_hook');
     41register_activation_hook(__FILE__, 'socailpu_activation_hook');
     42register_deactivation_hook(__FILE__, 'socailpu_deactivation_hook');
     43
     44
     45function socailpu_admin_menu() {
     46        add_menu_page(
     47            __( 'SocialProofUs', 'socialproofus.com' ),
     48            __( 'SocialProofUs', 'socialproofus.com' ),
     49            'manage_options',
     50            'socialproofus-page',
     51            'socailpu_contents',
     52            'dashicons-format-status',
     53            3
     54        );
     55    }
     56   
     57    /**
     58 * Add a widget to the dashboard.
     59 *
     60 * This function is hooked into the 'wp_dashboard_setup' action below.
     61 */
     62function wporg_add_dashboard_widgets() {
     63    wp_add_dashboard_widget(
     64        'wporg_dashboard_widget',                          // Widget slug.
     65        esc_html__( 'SocialProofUs Notifications', 'wporg' ), // Title.
     66        'wporg_dashboard_widget_render'                    // Display function.
     67    );
     68}
     69add_action( 'wp_dashboard_setup', 'wporg_add_dashboard_widgets' );
     70
     71/**
     72 * Create the function to output the content of our Dashboard Widget.
     73 */
     74function wporg_dashboard_widget_render() {
     75    // Display whatever you want to show.
     76    echo '<p>Welcome to SocialProofUs!<br><br>Login to your SocialProofUs <a href="https://SocialProofUs.com" target="_blank">account</a><br><br>SocialProofUs.com empowers your website with dynamic social proof notifications, offering over 27 options for free, while providing valuable insights into click impressions, CTR, and more, to optimize your online presence.<br><br> Need help? Contact us <a href="mailto:[email protected]">here</a></p>';
     77
    878}
    979
    1080
    11 // Load constants
    12 require_once plugin_dir_path(__FILE__) . 'includes/constants.php';
     81// END OF widget
    1382
    14 // Load hooks
    15 require_once plugin_dir_path(__FILE__) . 'includes/hooks.php';
     83function socailpu_inject_code()
     84{
     85    $pixelKey = get_option( 'socialproofus_field' );
     86    $version = SPUPConstants::version();?>
    1687
    17 // Load admin menu functions
    18 require_once plugin_dir_path(__FILE__) . 'includes/admin-menu.php';
     88<!-- Pixel Code INJ for https://socialproofus.com/ --><script async src="https://socialproofus.com/pixel/<?php echo esc_html($pixelKey); ?>"></script><!-- END Pixel Code -->
     89    <?php
     90}
    1991
    20 // Load dashboard widget
    21 require_once plugin_dir_path(__FILE__) . 'includes/dashboard-widget.php';
     92    function socailpu_contents() {
     93        ?><BR/>
     94        <a href="https://socialproofus.com">
     95            <img class="top-logo" src="<?php echo plugin_dir_url(__FILE__).'assets/top-logo.png'; ?>">
     96        </a>
     97            <h1>
     98                <?php esc_html_e( 'Enhance Your Website for Free with SocialProofUs', 'socialproofus.com' ); ?> - <?php echo SPUS_VERSION; ?>
     99            </h1>
     100            <p>
     101                <?php echo __('Like this plugin?', 'socialproofus'); ?> <a href="https://wordpress.org/support/plugin/socialproofus/reviews/#new-post" target="_blank" title="<?php echo __('Review on WordPress.org', 'socialproofus'); ?>"><?php echo __('Please submit a review', 'socialproofus'); ?></a> <a href="https://wordpress.org/support/plugin/socialproofus/reviews/#new-post" target="_blank" title="<?php echo __('Review on WordPress.org', 'socialproofus'); ?>" style="text-decoration: none;">
     102                    <span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span>
     103                </a>
     104            </p>
     105            <p style="font-size: 15px;">
     106                - <?php echo __('Want to support the developer?', 'socialproofus'); ?> <?php echo __('Feel free to', 'socialproofus'); ?> <a href="https://www.paypal.com/donate/?business=X2TAGWKQ8D7W6&no_recurring=0&item_name=Thank+you+so+much+for+your+donation.+Your+generosity+will+make+a+huge+difference.&currency_code=GBP" target="_blank"><?php echo __('Donate', 'socialproofus'); ?><span class="dashicons dashicons-external" style="font-size: 15px; margin-top: 5px; text-decoration: none;"></span></a>
     107            </p>
     108           <form method="POST" action="options.php">
     109    <?php
     110    settings_fields( 'socialproofus-page' );
     111    do_settings_sections( 'socialproofus-page' );
     112    submit_button();
     113    ?>
     114    </form>
     115    <?php
     116}
    22117
    23 // Load settings
    24 require_once plugin_dir_path(__FILE__) . 'includes/settings.php';
    25118
    26 // Load front-end functionality
    27 require_once plugin_dir_path(__FILE__) . 'includes/frontend.php';
     119function socialproofus_init() {
     120
     121    add_settings_section(
     122        'socialproofus_page_setting_section',
     123        __( 'Settings', 'socialproofus.com' ),
     124        'socialproofus_section_callback_function',
     125        'socialproofus-page'
     126    );
     127   
     128
     129        add_settings_field(
     130           'socialproofus_field',
     131           __( 'Enter your PIXEL code:', 'socialproofus.com' ),
     132           'socialproofus_markup',
     133           'socialproofus-page',
     134           'socialproofus_page_setting_section'
     135        );
     136
     137        register_setting( 'socialproofus-page', 'socialproofus_field' );
     138}
     139
     140function socailpu_admin_notice_html()
     141{
     142    //$socialproofus_field = get_option( 'socialproofus_field' );
     143    if( ! empty( get_option( 'socialproofus_field' ) ) ) {
     144        return;
     145    }
     146
     147
     148    ?>
     149
     150    <div class="notice notice-error is-dismissible">
     151        <p class="ps-error">SocialProofUs Requires Configuration <a href="admin.php?page=socialproofus-page">Click here</a></p>
     152    </div>
     153       
     154    <?php
     155}
     156
     157function socialproofus_section_callback_function() {
     158    $arrspu = array( 'br' => array(), 'p' => array(), 'strong' => array() );
     159    $strspu='<p>Choose from 27+ Free Notifications & Track Your Success with SocialProofUs.com!</p>
     160    <p>To utilize the SocialProofUs WordPress plugin, it is essential to have an active account with us.</p>
     161    <p>Having an account ensures seamless integration and access to all the features and benefits offered by our plugin.</p>
     162    <p>If you encounter any issues with the pixel code on your website, we recommend clearing your browser cache and then rechecking the pixel code implementation.</P>
     163    <p>Should you require further assistance, please dont hesitate to reach out to our support team at [email protected]</p>
     164    <p>Please enter the PIXEL code from your account on Socialproofus.com.</p>';
     165    $response = wp_remote_get( 'https://socialproofus.com/pixel/' );
     166    $http_code = wp_remote_retrieve_response_code( $response );
     167    //if ($http_code == "200") {
     168     //  echo 'Socialproofus.com status is: <font color="green">Online</font>';
     169    //} else {
     170    //   echo 'Socialproofus.com status is: <font color="red">Connection Interupted</font>';   
     171   // }
     172    echo wp_kses( $strspu, $arrspu );
     173   
     174}
     175
     176function socialproofus_markup() {
     177    $pixelKey = get_option( 'socialproofus_field' );
     178    $registersocial = 'https://socialproofus.com/register';
     179    $signinsocial = 'https://socialproofus.com/login';
     180    ?>
     181    <input type="text" placeholder="required" id="socialproofus_field" name="socialproofus_field" size="32" value="<?php echo esc_html($pixelKey); ?>" /><br><br>
     182    <button onclick="location.href='<?php echo esc_url($registersocial);?>'" type="button">
     183         Register for a free account</button> |
     184    <button onclick="location.href='<?php echo esc_url($signinsocial);?>'" type="button">
     185         Sign in</button><br><br>
     186    <?php
     187
     188}
  • socialproofus/trunk/readme.txt

    r3241020 r3241023  
    55Requires PHP:      7.2
    66Tested up to: 6.7
    7 Stable tag: 1.0.10
     7Stable tag: 1.0.9
    88License: GPLv3 or later.
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    6565
    6666== Changelog ==
    67 = 1.0.10 =
    68 ✅ Fixed function naming issues.
    69 ✅ Sanitized user inputs.
    70 ✅ Moved constants for better performance.
    71 ✅ Separated hooks into for cleaner code.
    72 ✅ Added a proper uninstall script.
    73 ✅ Improved security in settings and API calls.
    74 ✅ Better User Experience with Dark Mode.
    75 ✅ More Transparency with Live Status Check.
    76 ✅ Fade-in effects when changing themes.
    77 ✅ Smooth background transitions.
    78 ✅ Glassmorphism UI – Frosted glass look for a sleek, modern feel.
    79 ✅ Animated Gradient Background – Soft transitions between colors.
    80 ✅ Onboarding section and automatic update notifications.
    81 ✅ Smooth Fade-in Animation.
    82 
    83 == Changelog ==
    8467= 1.0.9 =
    8568Tested to latest WP version.
  • socialproofus/trunk/socialproofus.php

    r3241020 r3241023  
    11<?php
     2/*
    23/**
    3  * Plugin Name:       SocialProofUs
    4  * Plugin URI:        https://socialproofus.com
    5  * Description:       SocialProofUs is a FREE automated marketing platform providing notification widgets to help boost customer interaction and sales.
    6  * Version:           1.0.10
    7  * Author:            SocialProofUs
    8  * Author URI:        https://socialproofus.com
    9  * License:           GPLv3 or later
    10  * License URI:       https://www.gnu.org/licenses/gpl-3.0.html
    11  * Text Domain:       socialproofus
    12  * Domain Path:       /languages
     4 * Plugin Name: SocialProofus
     5 * Description: SocialProofus is a FREE automated marketing platform providing notification widgets to help boost customer interaction and sales.
     6 * Version: 1.0.9
     7 * Author: SocialProofus
     8 * Author URI: https://socialproofus.com
     9 * License: GPLv3 or later
     10 * Text Domain: socialproofus
    1311 * Requires at least: 6.0
    1412 * Requires PHP:      7.2
    15  */
    16 
    17 if ( ! defined( 'ABSPATH' ) ) {
    18     exit; // Prevent direct access to the file
    19 }
    20 
    21 // ✅ Correct file path (fixes typo)
    22 $includes_path = plugin_dir_path( __FILE__ ) . 'includes/socailpu-functions.php';
    23 
    24 if ( file_exists( $includes_path ) ) {
    25     require_once $includes_path;
    26 } else {
    27     error_log( 'SocialProofUs Error: Missing required file ' . $includes_path );
    28 }
     13*/
     14// Include mfp-functions.php, use require_once to stop the script if mfp-functions.php is not found
     15if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
     16require_once plugin_dir_path(__FILE__) . 'includes/socailpu-functions.php';
Note: See TracChangeset for help on using the changeset viewer.