Changeset 1212986
- Timestamp:
- 08/04/2015 11:31:17 PM (10 years ago)
- Location:
- hiilite-creative-group-branding/trunk
- Files:
-
- 1 added
- 2 edited
-
admin.inc.php (added)
-
index.php (modified) (15 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hiilite-creative-group-branding/trunk/index.php
r1188277 r1212986 1 1 <?php 2 2 /* 3 Plugin Name: Hiilite Admin 4 Plugin URI: http://hiilite.com 5 Description: This plugin customizes the WordPress login screen to Hiilite branding. 6 Version: 1.0.3 7 Author: Hiilite Creative Group 8 Author URI: http://hiilite.com/team/ 9 License: GPLv2 3 * Plugin Name: Hiilite Admin 4 * Plugin URI: http://hiilite.com 5 * Description: This plugin customizes the WordPress login screen to Hiilite branding. 6 * Version: 1.0.4 7 * Author: Hiilite Creative Group 8 * Author URI: http://hiilite.com/team/ 9 * License: GPLv2 10 * 11 * @package Hiilite_admin 12 * 10 13 */ 11 14 12 // add a new logo to the login page 15 // If this file is called directly, then abort execution. 16 if ( ! defined( 'WPINC' ) ) { 17 die( "Aren't you supposed to come here via WP-Admin?" ); 18 } 19 20 /** 21 * Holds the filesystem directory path. 22 */ 23 define( 'HIILITE_DIR', dirname( __FILE__ ) ); 24 25 // Set the global variables for Better Search path and URL 26 $hiilite_path = plugin_dir_path( __FILE__ ); 27 $hiilite_url = plugins_url() . '/' . plugin_basename( dirname( __FILE__ ) ); 28 //////////////////////////////////// 29 // 30 // Add a new logo to the login page 31 // 32 //////////////////////////////////// 13 33 function hiilite_login_logo() { ?> 14 34 <style type="text/css"> … … 57 77 add_action( 'login_enqueue_scripts', 'hiilite_login_logo' ); 58 78 79 /////////////////////////////// 80 // 59 81 // add new dashboard widgets 82 // 83 ////////////////////////////// 60 84 function hiilite_add_dashboard_widgets() { 61 85 wp_add_dashboard_widget( 'hiilite_dashboard_welcome', 'Welcome', 'hiilite_add_welcome_widget' ); … … 70 94 <a href="tel:+18883033444">1.888.303.3444</a><br> 71 95 </p><div id="social-icons"> 72 <a href="https://www.facebook.com/hiilite" target="_blank"><img src="http ://www.hiilite.com/wordpress/wp-content/uploads/2014/11/Facebook-32.png" width="32" height="32" alt="Facebook" scale="0"></a><a href="https://twitter.com/hiilite" target="_blank"><img src="http://www.hiilite.com/wordpress/wp-content/uploads/2014/11/Twitter-Bird-32.png" width="32" height="32" alt="Twitter" scale="0"></a><a href="https://plus.google.com/u/0/b/107657092449987968512/107657092449987968512" target="_blank"><img src="http://www.hiilite.com/wordpress/wp-content/uploads/2014/11/Google-Plus-32.png" width="32" height="32" alt="Google" scale="0"></a>96 <a href="https://www.facebook.com/hiilite" target="_blank"><img src="https://hiilite.com/wp-content/uploads/2014/11/Facebook-32.png" width="32" height="32" alt="Facebook" scale="0"></a><a href="https://twitter.com/hiilite" target="_blank"><img src="https://hiilite.com/wp-content/uploads/2014/11/Twitter-Bird-32.png" width="32" height="32" alt="Twitter" scale="0"></a><a href="https://plus.google.com/u/0/b/107657092449987968512/107657092449987968512" target="_blank"><img src="https://hiilite.com/wp-content/uploads/2014/11/Google-Plus-32.png" width="32" height="32" alt="Google" scale="0"></a> 73 97 </div> 74 98 … … 80 104 function hiilite_remove_dashboard_widgets() { 81 105 $user = wp_get_current_user(); 82 // if ( ! $user->has_cap( 'manage_options' ) ) { 83 remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' ); 84 remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); 85 remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); 86 remove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); 87 remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' ); 88 // } 106 remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' ); 107 remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); 108 remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); 109 remove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); 110 remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' ); 89 111 } 90 112 add_action( 'wp_dashboard_setup', 'hiilite_remove_dashboard_widgets' ); … … 93 115 function hiilite_move_dashboard_widget() { 94 116 $user = wp_get_current_user(); 95 //if ( ! $user->has_cap( 'manage_options' ) ) {96 117 global $wp_meta_boxes; 97 118 $widget = $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']; … … 102 123 unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity'] ); 103 124 $wp_meta_boxes['dashboard']['side']['core']['dashboard_activity'] = $widget2; 104 //} 125 105 126 } 106 127 add_action( 'wp_dashboard_setup', 'hiilite_move_dashboard_widget' ); 107 128 129 ///////////////////////////////////////////////////// 130 // 108 131 // let's start by enqueuing our styles correctly 132 // 133 //////////////////////////////////////////////////// 109 134 function hiilite_admin_styles() { 110 135 wp_register_style( 'hiilite_admin_stylesheet', plugins_url( '/css/style.css', __FILE__ ) ); … … 113 138 add_action( 'admin_enqueue_scripts', 'hiilite_admin_styles' ); 114 139 115 //change the footer text 140 function hiilite_front_scripts() { 141 wp_register_style( 'hiilite_stylesheet', plugins_url( '/css/stylefixes.css', __FILE__ ) ); 142 wp_enqueue_style( 'hiilite_stylesheet'); 143 144 } 145 146 add_action( 'wp_enqueue_scripts', 'hiilite_front_scripts' ); 147 148 ////////////////////////////////// 149 // 150 // Change the Admin footer text 151 // 152 ////////////////////////////////// 116 153 function hiilite_admin_footer_text () { 117 echo '<a href="http ://www.hiilite.com/marketing-strategy/"><img src="' . plugins_url( 'images/hiilite-logo-lettermark.png' , __FILE__ ) . '"> Marketing</a>, <a href="http://www.hiilite.com/seo-social-media/">SEO</a>, <a href="http://www.hiilite.com/website-design/">Web Design </a> by <a href="http://www.hiilite.com/">Hiilite Marketing + Web Design in Kelowna</a>';154 echo '<a href="https://hiilite.com/marketing-strategy/"><img src="' . plugins_url( 'images/hiilite-logo-lettermark.png' , __FILE__ ) . '"> Marketing</a>, <a href="https://hiilite.com/seo-social-media/">SEO</a>, <a href="https://hiilite.com/website-design/">Web Design </a> by <a href="https://hiilite.com/">Hiilite Marketing + Web Design in Kelowna</a>'; 118 155 ?> 119 156 <!-- Start of hiilite Zendesk Widget script --> … … 125 162 126 163 164 165 ////////////////////////////////// 166 // 167 // Change the Theme footer text 168 // 169 ////////////////////////////////// 170 /** 171 * Adds scripts to the footer. Filters `wp_footer`. 172 */ 173 function hiilite_addfooter() { 174 175 $hiilite_settings = hiilite_read_options(); 176 177 $hiilite_other = stripslashes( $hiilite_settings['hiilite_other'] ); 178 179 if ( '' != $hiilite_other ) { 180 echo $hiilite_other; 181 } 182 183 } 184 add_action( 'wp_footer', 'hiilite_addfooter' ); 185 186 /** 187 * Default options. 188 * 189 * @return array Array of default options 190 */ 191 function hiilite_default_options() { 192 $hiilite_settings = array ( 193 'enable_plugin' => false, // Enable plugin switch 194 'disable_notice' => false, // // Disable notice that is displayed when enable_plugin is false 195 'hiilite_other' => '<div id="hiilite_admin_footer" style="width:100%;clear:both;background:#23282d;line-height:2em;color:white; text-align:center;">Copyright © '.date('Y').' '.bloginfo('name').'. All rights reserved. <a style="color:white;" href="https://hiilite.com/">Kelowna Website Design</a>, <a style="color:white;" href="https://hiilite.com/marketing-strategy/">Strategic Marketing</a>, and <a style="color:white;" href="https://hiilite.com/seo-social-media/">SEO</a> by <a style="color:white;" href="https://hiilite.com/">Marketing and Web Agency Hiilite</a></div>' 196 ); 197 return apply_filters( 'hiilite_default_options', $hiilite_settings ); 198 } 199 200 /** 201 * Function to read options from the database and add any new ones. 202 * 203 * @return array Options from the database 204 */ 205 function hiilite_read_options() { 206 $hiilite_settings_changed = false; 207 208 $defaults = hiilite_default_options(); 209 210 $hiilite_settings = array_map( 'stripslashes', (array) get_option( 'hiilite_settings' ) ); 211 unset( $hiilite_settings[0] ); // produced by the (array) casting when there's nothing in the DB 212 213 // If there are any new options added to the Default Options array, let's add them 214 foreach ( $defaults as $k=>$v ) { 215 if ( ! isset( $hiilite_settings[ $k ] ) ) { 216 $hiilite_settings[ $k ] = $v; 217 } 218 $hiilite_settings_changed = true; 219 } 220 221 if ( true == $hiilite_settings_changed ) { 222 update_option( 'hiilite_settings', $hiilite_settings ); 223 } 224 225 return apply_filters( 'hiilite_read_options', $hiilite_settings ); 226 } 227 228 229 230 /** 231 * Admin option 232 * 233 */ 234 if ( is_admin() || strstr( $_SERVER['PHP_SELF'], 'wp-admin/' ) ) { 235 236 /** 237 * Load the admin pages if we're in the Admin. 238 * 239 */ 240 require_once( HIILITE_DIR . "/admin.inc.php" ); 241 242 /** 243 * Adding WordPress plugin action links. 244 * 245 * @param array $links 246 * @return array 247 */ 248 function hiilite_plugin_actions_links( $links ) { 249 250 return array_merge( 251 array( 252 'settings' => '<a href="' . admin_url( 'options-general.php?page=hiilite_options' ) . '">' . __( 'Settings', 'add-to-footer' ) . '</a>' 253 ), 254 $links 255 ); 256 257 } 258 add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'hiilite_plugin_actions_links' ); 259 260 /** 261 * Add meta links on Plugins page. 262 * 263 * @param array $links 264 * @param string $file 265 * @return array 266 */ 267 function hiilite_plugin_actions( $links, $file ) { 268 static $plugin; 269 if ( ! $plugin ) { 270 $plugin = plugin_basename( __FILE__ ); 271 } 272 273 // create link 274 if ( $file == $plugin ) { 275 $links[] = '<a href="http://wordpress.org/support/plugin/better-search">' . __( 'Support', 'add-to-footer' ) . '</a>'; 276 $links[] = '<a href="http://ajaydsouza.com/donate/">' . __( 'Donate', 'add-to-footer' ) . '</a>'; 277 } 278 return $links; 279 } 280 add_filter( 'plugin_row_meta', 'hiilite_plugin_actions', 10, 2 ); // only 2.8 and higher 281 282 } // End admin.inc 283 284 285 286 287 288 289 290 291 ////////////////////////////////// 292 // 293 // Change Admin Menu Bar 294 // 295 ////////////////////////////////// 127 296 add_action( 'admin_bar_menu', 'modify_admin_bar', 999 ); 128 297 … … 175 344 require_once dirname( __FILE__ ) . '/Plugin-Activation/class-tgm-plugin-activation.php'; 176 345 177 add_action( 'tgmpa_register', ' my_theme_register_required_plugins' );346 add_action( 'tgmpa_register', 'hiilite_register_required_plugins' ); 178 347 179 348 … … 190 359 * TGM_Plugin_Activation class constructor. 191 360 */ 192 function my_theme_register_required_plugins() {361 function hiilite_register_required_plugins() { 193 362 194 363 /** … … 219 388 'external_url' => '', // If set, overrides default API URL and points to an external URL. 220 389 ), 221 222 // This is an example of how to include a plugin from a private repo in your theme. 223 /* 224 array( 225 'name' => 'TGM New Media Plugin', // The plugin name. 226 'slug' => 'tgm-new-media-plugin', // The plugin slug (typically the folder name). 227 'source' => 'https://s3.amazonaws.com/tgm/tgm-new-media-plugin.zip', // The plugin source. 228 'required' => true, // If false, the plugin is only 'recommended' instead of required. 229 'external_url' => 'https://github.com/thomasgriffin/New-Media-Image-Uploader', // If set, overrides default API URL and points to an external URL. 230 ),*/ 390 array( 391 'name' => 'Gravity Forms', // The plugin name. 392 'slug' => 'gravityforms', // The plugin slug (typically the folder name). 393 'source' => plugin_dir_path( __FILE__ ) . '/Plugin-Activation/plugins/gravityforms.zip', // The plugin source. 394 'required' => false, // If false, the plugin is only 'recommended' instead of required. 395 'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher. 396 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 397 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. 398 'external_url' => '', // If set, overrides default API URL and points to an external URL. 399 ), 400 array( 401 'name' => 'Revolution Slider', // The plugin name. 402 'slug' => 'revslider', // The plugin slug (typically the folder name). 403 'source' => plugin_dir_path( __FILE__ ) . '/Plugin-Activation/plugins/revslider.zip', // The plugin source. 404 'required' => false, // If false, the plugin is only 'recommended' instead of required. 405 'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher. 406 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 407 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. 408 'external_url' => '', // If set, overrides default API URL and points to an external URL. 409 ), 231 410 232 411 // This is an example of how to include a plugin from the WordPress Plugin Repository. … … 235 414 'slug' => 'iwp-client', 236 415 'required' => false, 416 ), 417 array( 418 'name' => 'WP SEO Redirect 301', 419 'slug' => 'wp-seo-redirect-301', 420 'required' => false, 237 421 ), 238 422 array( … … 249 433 'name' => 'Sucuri Security - Auditing, Malware Scanner and Security Hardening', 250 434 'slug' => 'sucuri-scanner', 435 'required' => false, 436 ), 437 array( 438 'name' => 'underConstruction', 439 'slug' => 'underconstruction', 440 'required' => false, 441 ), 442 array( 443 'name' => 'Limit Login Attempts', 444 'slug' => 'limit-login-attempts', 251 445 'required' => false, 252 446 ), … … 264 458 'default_path' => '', // Default absolute path to pre-packaged plugins. 265 459 'menu' => 'tgmpa-install-plugins', // Menu slug. 266 'has_notices' => true, // Show admin notices or not.460 'has_notices' => false, // Show admin notices or not. 267 461 'dismissable' => true, // If false, a user cannot dismiss the nag message. 268 462 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. … … 270 464 'message' => '', // Message to output right before the plugins table. 271 465 'strings' => array( 272 'page_title' => __( 'Install Required Plugins', 'tgmpa' ),273 'menu_title' => __( 'Install Plugins', 'tgmpa' ),274 'installing' => __( 'Installing Plugin: %s', 'tgmpa' ), // %s = plugin name.466 'page_title' => __( 'Install Hiilite Recommended Plugins', 'tgmpa' ), 467 'menu_title' => __( 'Install Hiilite Plugins', 'tgmpa' ), 468 'installing' => __( 'Installing Hiilite Plugin: %s', 'tgmpa' ), // %s = plugin name. 275 469 'oops' => __( 'Something went wrong with the plugin API.', 'tgmpa' ), 276 470 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), // %1$s = plugin name(s). -
hiilite-creative-group-branding/trunk/readme.txt
r1188232 r1212986 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.2.1 6 Stable tag: 1.0. 36 Stable tag: 1.0.4 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 50 50 51 51 * Added recommended plugins, including WordPress SEO by Yoast, WPBakery Visual Composer, Backup Buddy, Sucuri Security, InfiniteWP Client and Math Captcha 52 53 = 1.0.4 = 54 55 * Added recommended plugins and new footer text panel 56
Note: See TracChangeset
for help on using the changeset viewer.