Plugin Directory

Changeset 1293612


Ignore:
Timestamp:
11/24/2015 04:54:37 PM (10 years ago)
Author:
imforza
Message:

Update to 1.3.3

  • Check for posts by wpengine user
  • Improved support for wp101
Location:
imforza-news/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • imforza-news/trunk/admin/users.php

    r1293128 r1293612  
    2323    update_user_meta($imforza_user_id, 'facebook', 'https://www.facebook.com/imforza');
    2424    wp_update_user( array( 'ID' => $imforza_user_id, 'user_url' => '//www.imforza.com', 'display_name' => 'imFORZA Team' ));
     25
     26    // imFORZA
    2527    update_user_meta($imforza_user_id, 'imforza_tracking', '1');
     28
    2629    // Yoast SEO
    2730    update_user_meta($imforza_user_id, 'wpseo_excludeauthorsitemap', 'on');
     
    152155
    153156
    154 
    155 
    156 
    157 
    158157/* Prompt imforza-dev if assigned to any posts */
    159158function imforza_user_has_posts() {
     
    165164  $result = new WP_Query(array(
    166165    'author'=>$imforza_user_id,
    167     'post_type'=>'any',
     166    'post_type'=> array('post', 'page', 'listing', 'testimonial'),
    168167    'post_status'=>'publish',
    169168    'posts_per_page'=>1,
     
    178177       ?>
    179178    <div class="error">
    180         <p><?php _e( 'Currently some posts, pages, or CPTs are assigned to the <strong>imforza-dev</strong> user. Please assign them to the appropriate author. This message will remain until all of them have been re-assigned.', 'imforza-news' ); ?></p>
     179        <p><?php _e( 'Currently some posts, pages, or CPTs are assigned to the <strong>imforza-dev</strong> user. Please assign them to the appropriate author.', 'imforza-news' ); ?></p>
    181180    </div>
    182181    <?php
     
    189188
    190189add_action('admin_notices', 'imforza_user_has_posts');
     190
     191
     192
  • imforza-news/trunk/imforza.php

    r1293128 r1293612  
    22/*
    33Plugin Name: imFORZA
    4 Version: 1.3.2
     4Version: 1.3.3
    55Plugin URI: //www.imforza.com#utm_source=wpadmin&utm_medium=plugin&utm_campaign=imforzanewsplugin
    66Description: imFORZA is a Web Design and Marketing company based out of El Segundo, CA. Get quick access to imFORZA Support and the latest marketing news.
     
    1515
    1616// Define Plugin Version
    17 define( 'IMFORZA_PLUGIN_VERSION', '1.3.2' );
     17define( 'IMFORZA_PLUGIN_VERSION', '1.3.3' );
     18
     19
    1820
    1921
     
    4850 */
    4951function imforza_activation() {
     52
     53    update_option( 'imforza', array('version' => '1.3.3'));
     54
    5055    flush_rewrite_rules();
    5156}
  • imforza-news/trunk/modules/wp101.php

    r1290277 r1293612  
    5757
    5858
     59            /* Locks down wp101 settings to imforza-dev user */
     60            if ( username_exists( 'imforza-dev' ) ) {
    5961
     62            $imforza_user_id = username_exists( 'imforza-dev' );
    6063
    61         // TODO
    62         // Lock down the seetings page to only the imforza-dev user, wp101 plugin has an option to set this already. "wp101_admin_restriction"
     64            update_option('wp101_admin_restriction', $imforza_user_id);
     65
     66            }
     67
    6368
    6469}
  • imforza-news/trunk/modules/wpengine.php

    r1293111 r1293612  
    7474
    7575
    76 
    77 
    78 
    7976/**
    8077 * Remove the WP Engine menu page
     
    127124
    128125
     126/* Prompt imforza if wpengine user is assigned to any posts */
     127function imforza_wpengine_user_has_posts() {
     128
     129        if ( username_exists( 'wpengine' ) ) {
     130
     131        $wpengine_user_id = username_exists( 'wpengine' );
     132
     133  $result = new WP_Query(array(
     134    'author'=>$wpengine_user_id,
     135    'post_type'=> array('post', 'page', 'listing', 'testimonial'),
     136    'post_status'=>'publish',
     137    'posts_per_page'=>1,
     138  ));
     139
     140  if( count($result->posts) !=0 ) {
     141
     142    $current_user = wp_get_current_user();
     143
     144    if ( $current_user->user_login == 'imforza-dev') {
     145
     146       ?>
     147    <div class="error">
     148        <p><?php _e( 'Currently some posts, pages, or CPTs are assigned to the <strong>wpengine</strong> user. Please assign them to the appropriate author.', 'imforza-news' ); ?></p>
     149    </div>
     150    <?php
     151        }
     152  }
     153
     154  }
     155
     156}
     157
     158add_action('admin_notices', 'imforza_wpengine_user_has_posts');
     159
     160
     161
     162/* WP ENGINE SETTINGS */
    129163function imforza_wpengine_settings() {
    130164
     
    165199}
    166200
    167 
    168 
    169 
    170201}
    171202add_action('init', 'imforza_wpengine_settings' );
  • imforza-news/trunk/readme.txt

    r1293128 r1293612  
    55Requires at least: 4.0
    66Tested up to: 4.4
    7 Stable tag: 1.3.2
     7Stable tag: 1.3.3
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    2121
    2222== Changelog ==
     23
     24= 1.3.3 =
     25* Check for posts by `wpengine` user
     26* Improved support for wp101
    2327
    2428= 1.3.2 =
Note: See TracChangeset for help on using the changeset viewer.