Plugin Directory

Changeset 1103583


Ignore:
Timestamp:
03/02/2015 09:13:53 PM (11 years ago)
Author:
bcole808
Message:

Release of v1.4.3

Location:
social-metrics-tracker
Files:
104 added
4 edited

Legend:

Unmodified
Added
Removed
  • social-metrics-tracker/trunk/SocialMetricsSettings.class.php

    r1094497 r1103583  
    4040
    4141            default:
     42                if (count($_POST) > 0) {
     43                    $this->process_general_form();
     44                }
     45
    4246                $this->section = 'general';
    4347                $this->wpsf = new WordPressSettingsFramework( plugin_dir_path( __FILE__ ) .'settings/smt-'.$this->section.'.php', 'smt' );
     
    96100
    97101        </div>
    98     <?php }
     102    <?php
     103    }
    99104
    100105
    101106    // Render the general settings page
    102107    function general_section() {
    103         $this->wpsf->settings();
    104     }
    105 
     108        $this->wpsf->settings('');
     109    }
     110
     111    // Saves the general settings page
     112    function process_general_form() {
     113        if (!isset($_POST) || count($_POST) == 0) return;
     114        $this->smt->merge_smt_options($_POST['smt_settings']);
     115    }
    106116
    107117    // Renders the Test Tool page
  • social-metrics-tracker/trunk/lib/wp-settings-framework.php

    r1092718 r1103583  
    254254         * Output the settings form
    255255         */
    256         function settings()
     256        function settings($form_action='options.php')
    257257        {
    258258            do_action('wpsf_before_settings');
    259259            ?>
    260             <form action="options.php" method="post">
     260            <form action="<?php echo $form_action; ?>" method="post">
    261261                <?php do_action('wpsf_before_settings_fields'); ?>
    262262                <?php settings_fields( $this->option_group ); ?>
  • social-metrics-tracker/trunk/readme.txt

    r1094497 r1103583  
    55Requires at least: 3.5
    66Tested up to: 4.1.1
    7 Stable tag: 1.4.2
     7Stable tag: 1.4.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9696
    9797== Changelog ==
     98
     99= 1.4.3 =
     100* Fixed a bug where saving the general settings page would overwrite domain migration settings
     101* Fixed a bug where the dashboard widget would display regardless of if it was enabled
     102* Load dashboard assets over SSL if enabled
    98103
    99104= 1.4.2 =
     
    180185== Upgrade Notice ==
    181186
    182 = 1.4.2
     187= 1.4.3 =
     188Bug fixes
     189
     190= 1.4.2 =
    183191Fixed a bug where domain migration settings were being erased
    184192
  • social-metrics-tracker/trunk/social-metrics-tracker.php

    r1094497 r1103583  
    44Plugin URI: https://github.com/ChapmanU/wp-social-metrics-tracker
    55Description: Collect and display social network shares, likes, tweets, and view counts of posts.
    6 Version: 1.4.2
     6Version: 1.4.3
    77Author: Ben Cole, Chapman University
    88Author URI: http://www.bencole.net
     
    3939class SocialMetricsTracker {
    4040
    41     public $version = '1.4.2'; // for db upgrade comparison
     41    public $version = '1.4.3'; // for db upgrade comparison
    4242    public $updater;
    4343    public $options;
     
    140140        wp_enqueue_script( 'smt-js' );
    141141
    142         wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
     142        wp_enqueue_style('jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
    143143
    144144    } // end adminHeaderScripts()
     
    158158
    159159    public function dashboard_setup() {
    160         new SocialMetricsTrackerWidget($this);
     160        if ($this->get_smt_option('display_widget')) new SocialMetricsTrackerWidget($this);
    161161    }
    162162
     
    322322
    323323    /***************************************************
     324    * Merge another array of options into the current, use input to overwrite local settings
     325    ***************************************************/
     326    public function merge_smt_options($options) {
     327        $this->options = array_merge($this->options, $options);
     328        return $this->save_smt_options();
     329    }
     330
     331    /***************************************************
    324332    * Saves the settings to the DB
    325333    ***************************************************/
Note: See TracChangeset for help on using the changeset viewer.