Changeset 1468746
- Timestamp:
- 08/05/2016 04:08:39 PM (10 years ago)
- Location:
- fixed-menu-anchor/trunk
- Files:
-
- 8 added
- 2 deleted
- 2 edited
-
admin/settings.php (modified) (1 diff)
-
admin/twig/settings-locked.html (deleted)
-
admin/twig/settings-unlocked.html (deleted)
-
admin/twig/settings.html (added)
-
css (added)
-
css/admin.css (added)
-
fixed-menu-anchor.php (modified) (5 diffs)
-
img (added)
-
img/laptop.png (added)
-
img/laptop.svg (added)
-
img/phone.png (added)
-
img/phone.svg (added)
Legend:
- Unmodified
- Added
- Removed
-
fixed-menu-anchor/trunk/admin/settings.php
r1415651 r1468746 49 49 $twig = new \Twig_Environment($loader); 50 50 51 if (false == $licenseHandler->isPluginUnlocked()) { 52 echo $twig->render( 53 'settings-locked.html', 54 array( 55 'cssClassesToBeIgnored' => $options['cssClassesToBeIgnored'], 56 'curlEnabled' => extension_loaded('curl'), 57 'unlockResponse' => $unlockResponse, 58 'userDefinedDistance' => $options['userDefinedDistance'], 59 'version' => FIXEDMENUANCHOR_VERSION, 60 ) 61 ); 62 } else { 63 echo $twig->render( 64 'settings-unlocked.html', 65 array( 66 'cssClassesToBeIgnored' => $options['cssClassesToBeIgnored'], 67 'freshlyUnlocked' => $freshlyUnlocked, 68 'maximumViewportWidth' => $options['maximumViewportWidth'], 69 'maximumViewportWidthDistance' => $options['maximumViewportWidthDistance'], 70 'userDefinedDistance' => $options['userDefinedDistance'], 71 'version' => FIXEDMENUANCHOR_VERSION, 72 ) 73 ); 74 } 51 echo $twig->render( 52 'settings.html', 53 array( 54 // settings 55 'cssClassesToBeIgnored' => $options['cssClassesToBeIgnored'], 56 'maximumViewportWidth' => $options['maximumViewportWidth'], 57 'maximumViewportWidthDistance' => $options['maximumViewportWidthDistance'], 58 'userDefinedDistance' => $options['userDefinedDistance'], 59 60 // system information 61 'curlEnabled' => extension_loaded('curl'), 62 'freshlyUnlocked' => $freshlyUnlocked, 63 'image_dir_url' => plugin_dir_url( __FILE__ ) .'../img/', 64 'pluginIsUnlocked' => $licenseHandler->isPluginUnlocked() 65 ) 66 ); -
fixed-menu-anchor/trunk/fixed-menu-anchor.php
r1468739 r1468746 8 8 * Plugin Name: Fixed Menu Anchor 9 9 * Plugin URI: https://wordpress.org/plugins/fixed-menu-anchor 10 * Version: 2. 2.110 * Version: 2.3 11 11 * Description: Having problems with a fixed header/menu which overlaps the target of an anchor? Use this plugin to jump just before the target so that the fixed header/menu does not overlap anymore. 12 12 * Author: Konrad Abicht, Marc Sauerwald … … 16 16 17 17 require_once 'vendor/autoload.php'; 18 19 if (!defined('FIXEDMENUANCHOR_VERSION')) {20 define('FIXEDMENUANCHOR_VERSION', '2.2.1');21 }22 18 23 19 // when not in admin area ... … … 78 74 // when in admin area ... 79 75 } else { 80 function fixedMenuAnchor_adminInit() 81 { 76 add_action('admin_menu', function(){ 82 77 // stop execution if user is not a super admin 83 78 if (false == is_super_admin()) { … … 92 87 'manage_options', 93 88 'fixedMenuAnchor', 94 'fixedMenuAnchor_adminSettings' 89 function() { 90 require_once 'admin/settings.php'; 91 } 95 92 ); 96 } 93 }); 97 94 98 function fixedMenuAnchor_adminSettings() 99 { 100 require_once 'admin/settings.php'; 101 } 102 103 add_action('admin_menu', 'fixedMenuAnchor_adminInit'); 95 // add CSS to admin area 96 add_action('admin_enqueue_scripts', function() { 97 wp_enqueue_style('custom-admin-style', plugin_dir_url( __FILE__ ) . 'css/admin.css'); 98 }); 104 99 105 100 /* 106 101 * add Settings link in plugin view 107 102 */ 108 add_filter('plugin_action_links', 'fixedMenuAnchor_plugin_action_links', 10, 2); 109 function fixedMenuAnchor_plugin_action_links($links, $file) 110 { 103 add_filter('plugin_action_links', function($links, $file) { 111 104 static $this_plugin; 112 105 … … 125 118 126 119 return $links; 127 } 120 }, 10, 2); 128 121 }
Note: See TracChangeset
for help on using the changeset viewer.