Changeset 2134959
- Timestamp:
- 08/06/2019 12:37:27 PM (7 years ago)
- Location:
- genesis-simple-hooks
- Files:
-
- 12 added
- 16 edited
- 1 copied
-
tags/2.3.0 (copied) (copied from genesis-simple-hooks/trunk)
-
tags/2.3.0/.circleci (added)
-
tags/2.3.0/.circleci/config.yml (added)
-
tags/2.3.0/composer.json (added)
-
tags/2.3.0/composer.lock (added)
-
tags/2.3.0/genesis-simple-hooks.php (modified) (3 diffs)
-
tags/2.3.0/includes/class-genesis-simple-hooks-admin.php (modified) (46 diffs)
-
tags/2.3.0/includes/class-genesis-simple-hooks.php (added)
-
tags/2.3.0/includes/deprecated.php (modified) (1 diff)
-
tags/2.3.0/includes/functions.php (modified) (4 diffs)
-
tags/2.3.0/languages/genesis-simple-hooks.pot (modified) (1 diff)
-
tags/2.3.0/package-lock.json (added)
-
tags/2.3.0/package.json (modified) (2 diffs)
-
tags/2.3.0/plugin.php (modified) (1 diff)
-
tags/2.3.0/readme.txt (modified) (5 diffs)
-
trunk/.circleci (added)
-
trunk/.circleci/config.yml (added)
-
trunk/composer.json (added)
-
trunk/composer.lock (added)
-
trunk/genesis-simple-hooks.php (modified) (3 diffs)
-
trunk/includes/class-genesis-simple-hooks-admin.php (modified) (46 diffs)
-
trunk/includes/class-genesis-simple-hooks.php (added)
-
trunk/includes/deprecated.php (modified) (1 diff)
-
trunk/includes/functions.php (modified) (4 diffs)
-
trunk/languages/genesis-simple-hooks.pot (modified) (1 diff)
-
trunk/package-lock.json (added)
-
trunk/package.json (modified) (2 diffs)
-
trunk/plugin.php (modified) (1 diff)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
genesis-simple-hooks/tags/2.3.0/genesis-simple-hooks.php
r1831101 r2134959 1 1 <?php 2 /** 3 * This file handles the creation of the Simple Hooks admin menu. 4 * 5 * @package genesis-simple-hooks 6 */ 2 7 3 class Genesis_Simple_Hooks { 8 define( 'GENESIS_SIMPLE_HOOKS_DIR', plugin_dir_path( __FILE__ ) ); 9 define( 'GENESIS_SIMPLE_HOOKS_URL', plugins_url( '', __FILE__ ) ); 10 define( 'GENESIS_SIMPLE_HOOKS_VERSION', '2.3.0' ); 4 11 5 /** 6 * Plugin version 7 */ 8 public $plugin_version = '2.2.1'; 9 10 /** 11 * Minimum WordPress version. 12 */ 13 public $min_wp_version = '4.7.2'; 14 15 /** 16 * Minimum Genesis version. 17 */ 18 public $min_genesis_version = '2.4.2'; 19 20 /** 21 * The plugin textdomain, for translations. 22 */ 23 public $plugin_textdomain = 'genesis-simple-hooks'; 24 25 /** 26 * The url to the plugin directory. 27 */ 28 public $plugin_dir_url; 29 30 /** 31 * The path to the plugin directory. 32 */ 33 public $plugin_dir_path; 34 35 /** 36 * The main settings field for this plugin. 37 */ 38 public $settings_field = 'simplehooks-settings'; 39 40 /** 41 * Admin menu and settings page. 42 */ 43 public $admin; 44 45 /** 46 * Constructor. 47 * 48 * @since 2.2.0 49 */ 50 public function __construct() { 51 52 $this->plugin_dir_url = plugin_dir_url( __FILE__ ); 53 $this->plugin_dir_path = plugin_dir_path( __FILE__ ); 54 55 // For backward compatibility 56 define( 'SIMPLEHOOKS_PLUGIN_DIR', $this->plugin_dir_path ); 57 58 } 59 60 /** 61 * Initialize. 62 * 63 * @since 2.2.0 64 */ 65 public function init() { 66 67 $this->load_plugin_textdomain(); 68 69 add_action( 'admin_notices', array( $this, 'requirements_notice' ) ); 70 71 // Because this is a Genesis-dependent plugin 72 add_action( 'genesis_setup', array( $this, 'includes' ) ); 73 add_action( 'genesis_admin_init', array( $this, 'instantiate' ) ); 74 add_action( 'genesis_setup', array( $this, 'execute_hooks' ) ); 75 76 } 77 78 /** 79 * Show admin notice if minimum requirements aren't met. 80 * 81 * @since 2.2.0 82 */ 83 public function requirements_notice() { 84 85 if ( ! defined( 'PARENT_THEME_VERSION' ) || ! version_compare( PARENT_THEME_VERSION, $this->min_genesis_version, '>=' ) ) { 86 87 $plugin = get_plugin_data( $this->plugin_dir_path . 'plugin.php' ); 88 89 $action = defined( 'PARENT_THEME_VERSION' ) ? __( 'upgrade to', 'plugin-boilerplate' ) : __( 'install and activate', 'plugin-boilerplate' ); 90 91 $message = sprintf( __( '%s requires WordPress %s and <a href="%s" target="_blank">Genesis %s</a>, or greater. Please %s the latest version of Genesis to use this plugin.', 'plugin-boilerplate' ), $plugin['name'], $this->min_wp_version, 'http://my.studiopress.com/?download_id=91046d629e74d525b3f2978e404e7ffa', $this->min_genesis_version, $action ); 92 echo '<div class="notice notice-warning"><p>' . $message . '</p></div>'; 93 94 } 95 96 } 97 98 /** 99 * Load the plugin textdomain, for translation. 100 * 101 * @since 2.2.0 102 */ 103 public function load_plugin_textdomain() { 104 load_plugin_textdomain( 'genesis-simple-hooks', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); 105 } 106 107 /** 108 * All general includes. 109 * 110 * @since 2.2.0 111 */ 112 public function includes() { 113 114 require_once( $this->plugin_dir_path . 'includes/functions.php' ); 115 require_once( $this->plugin_dir_path . 'includes/deprecated.php' ); 116 117 } 118 119 /** 120 * Include the class file, instantiate the classes, create objects. 121 * 122 * @since 2.2.0 123 */ 124 public function instantiate() { 125 126 require_once( $this->plugin_dir_path . 'includes/class-genesis-simple-hooks-admin.php' ); 127 $this->admin = new Genesis_Simple_Hooks_Admin; 128 $this->admin->init(); 129 130 } 131 132 /** 133 * Helper function to retrieve the static object without using globals. 134 * 135 * @since 2.2.0 136 */ 137 public function execute_hooks() { 138 139 $hooks = get_option( $this->settings_field ); 140 141 //print_r( $hooks ); 142 143 foreach ( (array) $hooks as $hook => $array ) { 144 145 // Add new content to hook 146 if ( ! empty( $array['content'] ) ) { 147 add_action( $hook, array( $this, 'execute_hook' ) ); 148 } 149 150 // Unhook stuff 151 if ( isset( $array['unhook'] ) ) { 152 153 foreach( (array) $array['unhook'] as $function ) { 154 remove_action( $hook, $function ); 155 } 156 157 } 158 159 } 160 161 } 162 163 /** 164 * The following function executes any code meant to be hooked. 165 * It checks to see if shortcodes or PHP should be executed as well. 166 * 167 * @uses simplehooks_get_option() 168 * 169 * @since 2.2.0 170 */ 171 public function execute_hook() { 172 173 $hook = current_filter(); 174 $content = simplehooks_get_option( $hook, 'content' ); 175 176 if ( ! $hook || ! $content ) { 177 return; 178 } 179 180 $shortcodes = simplehooks_get_option( $hook, 'shortcodes' ); 181 $php = simplehooks_get_option( $hook, 'php' ); 182 183 $value = $shortcodes ? do_shortcode( $content ) : $content; 184 185 if ( $php ) { 186 eval( "?>$value " ); 187 } else { 188 echo $value; 189 } 190 191 } 192 193 } 12 require_once GENESIS_SIMPLE_HOOKS_DIR . '/includes/class-genesis-simple-hooks.php'; 194 13 195 14 /** … … 198 17 * @since 0.9.0 199 18 */ 200 function Genesis_Simple_Hooks() {19 function genesis_simple_hooks() { 201 20 202 21 static $object; 203 22 204 if ( null == $object ) {205 $object = new Genesis_Simple_Hooks ;23 if ( null === $object ) { 24 $object = new Genesis_Simple_Hooks(); 206 25 } 207 26 … … 209 28 } 210 29 /** 211 * Initialize the object on `plugins_loaded`.30 * Initialize the object on `plugins_loaded`. 212 31 */ 213 32 add_action( 'plugins_loaded', array( Genesis_Simple_Hooks(), 'init' ) ); -
genesis-simple-hooks/tags/2.3.0/includes/class-genesis-simple-hooks-admin.php
r1831101 r2134959 2 2 /** 3 3 * This file handles the creation of the Simple Hooks admin menu. 4 * 5 * @package genesis-simple-hooks 4 6 */ 5 6 7 7 8 /** … … 17 18 * 18 19 * @since 2.2.0 20 * 21 * @var $settings_field Settings Field 19 22 */ 20 23 public $settings_field = 'simplehooks-settings'; 21 24 25 /** 26 * WP Hooks. 27 * 28 * @since 2.2.0 29 * 30 * @var $wp_hooks WP Hooks 31 */ 22 32 public $wp_hooks; 23 33 34 /** 35 * Document Hooks. 36 * 37 * @since 2.2.0 38 * 39 * @var $document_hooks Document Hooks 40 */ 24 41 public $document_hooks; 25 42 43 /** 44 * Header Hooks. 45 * 46 * @since 2.2.0 47 * 48 * @var $header_hooks Header Hooks 49 */ 26 50 public $header_hooks; 27 51 52 /** 53 * Content Hooks. 54 * 55 * @since 2.2.0 56 * 57 * @var $content_hooks Content Hooks 58 */ 28 59 public $content_hooks; 29 60 61 /** 62 * Loop Hooks. 63 * 64 * @since 2.2.0 65 * 66 * @var $loop_hooks Loop Hooks 67 */ 30 68 public $loop_hooks; 31 69 70 /** 71 * Entry Hooks. 72 * 73 * @since 2.2.0 74 * 75 * @var $settings_field Entry Hooks 76 */ 32 77 public $entry_hooks; 33 78 79 /** 80 * Post Hooks. 81 * 82 * @since 2.2.0 83 * 84 * @var $settings_field Post Hooks 85 */ 34 86 public $post_hooks; 35 87 88 /** 89 * Comment Hooks. 90 * 91 * @since 2.2.0 92 * 93 * @var $comment_hooks Comment Hooks 94 */ 36 95 public $comment_hooks; 37 96 97 /** 98 * Sidebar Hooks. 99 * 100 * @since 2.2.0 101 * 102 * @var $sidebar_hooks Sidebar Hooks 103 */ 38 104 public $sidebar_hooks; 39 105 106 /** 107 * Footer Hooks. 108 * 109 * @since 2.2.0 110 * 111 * @var $footer_hooks Footer Hooks 112 */ 40 113 public $footer_hooks; 41 114 115 /** 116 * Admin Hooks. 117 * 118 * @since 2.2.0 119 * 120 * @var $admin_hooks Admin Hooks 121 */ 42 122 public $admin_hooks; 43 123 … … 46 126 * 47 127 * @since 1.8.0 48 *49 128 */ 50 129 public function __construct() { 51 130 52 // For backward compatibility 131 // For backward compatibility. 53 132 define( 'SIMPLEHOOKS_SETTINGS_FIELD', $this->settings_field ); 54 133 … … 81 160 'parent_slug' => 'genesis', 82 161 'page_title' => __( 'Genesis - Simple Hooks', 'genesis-simple-hooks' ), 83 'menu_title' => __( 'Simple Hooks', 'genesis-simple-hooks' ) 84 ) 162 'menu_title' => __( 'Simple Hooks', 'genesis-simple-hooks' ), 163 ), 85 164 ); 86 165 … … 89 168 ); 90 169 91 // Create the page 170 // Create the page. 92 171 $this->create( $page_id, $menu_ops, $page_ops, $this->settings_field, $this->get_default_settings() ); 93 172 … … 98 177 * 99 178 * @since 1.8.0 100 *101 179 */ 102 180 public function scripts() { 103 181 104 // Load parent scripts as well as Genesis admin scripts */182 // Load parent scripts as well as Genesis admin scripts. 105 183 parent::scripts(); 106 184 genesis_scripts()->enqueue_and_localize_admin_scripts(); … … 112 190 * 113 191 * @since 2.2.0 192 * 193 * @param Array $newvalue New value. 194 * @param Array $oldvalue Old value. 114 195 */ 115 196 public function save( $newvalue, $oldvalue ) { … … 132 213 133 214 } 134 135 215 } 136 216 … … 147 227 148 228 $this->wp_hooks = array( 149 'wp_head' => array(229 'wp_head' => array( 150 230 'description' => __( 'Executes immediately before the closing <code></head></code> tag.', 'genesis-simple-hooks' ), 151 231 'unhook' => array( 'genesis_load_favicon', 'genesis_do_meta_pingback', 'genesis_paged_rel', 'genesis_meta_name', 'genesis_meta_url', 'genesis_header_scripts', 'genesis_custom_header_style' ), … … 162 242 'unhook' => array( 'genesis_do_doctype' ), 163 243 ), 164 'genesis_title' => array(244 'genesis_title' => array( 165 245 'description' => __( 'Executes in the document head. Genesis uses this to output the document title.', 'genesis-simple-hooks' ), 166 246 'unhook' => array( 'genesis_do_title' ), 167 247 ), 168 'genesis_meta' => array(248 'genesis_meta' => array( 169 249 'description' => __( 'Executes in the document head. Genesis uses this to output meta tags.', 'genesis-simple-hooks' ), 170 'unhook' => array( 'genesis_seo_meta_description', 'genesis_seo_meta_keywords', 'genesis_robots_meta', 'genesis_responsive_viewport' ,),171 ), 172 'genesis_before' => array(250 'unhook' => array( 'genesis_seo_meta_description', 'genesis_seo_meta_keywords', 'genesis_robots_meta', 'genesis_responsive_viewport' ), 251 ), 252 'genesis_before' => array( 173 253 'description' => __( 'Executes immediately after the opening <code><body></code> tag.', 'genesis-simple-hooks' ), 174 254 ), 175 'genesis_after' => array(255 'genesis_after' => array( 176 256 'description' => __( 'Executes immediately before the closing <code></body></code> tag.', 'genesis-simple-hooks' ), 177 257 ), … … 179 259 180 260 $this->header_hooks = array( 181 'genesis_before_header' => array(182 'description' => __( 'Executes immediately before the header.', 'genesis-simple-hooks' ) 183 ), 184 'genesis_header' => array(261 'genesis_before_header' => array( 262 'description' => __( 'Executes immediately before the header.', 'genesis-simple-hooks' ), 263 ), 264 'genesis_header' => array( 185 265 'description' => __( 'Genesis uses this hook to output the default header.', 'genesis-simple-hooks' ), 186 266 'unhook' => array( 'genesis_do_header' ), 187 267 ), 188 'genesis_header_right' => array(268 'genesis_header_right' => array( 189 269 'description' => __( 'Executes inside the page header, immediately before the header widget area.', 'genesis-simple-hooks' ), 190 270 ), 191 'genesis_after_header' => array(192 'description' => __( 'Executes immediately after the header.', 'genesis-simple-hooks' ) 193 ), 194 'genesis_site_title' => array(195 'description' => __( 'Executes inside the header. Genesis uses this hook to output the site title.' , 'genesis-simple-hooks' ),271 'genesis_after_header' => array( 272 'description' => __( 'Executes immediately after the header.', 'genesis-simple-hooks' ), 273 ), 274 'genesis_site_title' => array( 275 'description' => __( 'Executes inside the header. Genesis uses this hook to output the site title.', 'genesis-simple-hooks' ), 196 276 'unhook' => array( 'genesis_seo_site_title' ), 197 277 ), 198 278 'genesis_site_description' => array( 199 'description' => __( 'Executes inside the header. Genesis uses this hook to output the site description.' , 'genesis-simple-hooks' ),279 'description' => __( 'Executes inside the header. Genesis uses this hook to output the site description.', 'genesis-simple-hooks' ), 200 280 'unhook' => array( 'genesis_seo_site_description' ), 201 281 ), … … 206 286 'description' => __( 'Executes before the content-sidebar-wrap opening markup.', 'genesis-simple-hooks' ), 207 287 ), 208 'genesis_after_content_sidebar_wrap' => array(288 'genesis_after_content_sidebar_wrap' => array( 209 289 'description' => __( 'Executes after the content-sidebar-wrap closing markup.', 'genesis-simple-hooks' ), 210 290 ), 211 'genesis_before_content' => array(291 'genesis_before_content' => array( 212 292 'description' => __( 'Executes before the content opening markup.', 'genesis-simple-hooks' ), 213 293 ), 214 'genesis_after_content' => array(294 'genesis_after_content' => array( 215 295 'description' => __( 'Executes after the content closing markup.', 'genesis-simple-hooks' ), 216 296 ), … … 218 298 219 299 $this->loop_hooks = array( 220 'genesis_before_loop' => array(300 'genesis_before_loop' => array( 221 301 'description' => __( 'Executes before the loop.', 'genesis-simple-hooks' ), 222 302 ), 223 'genesis_loop' => array(303 'genesis_loop' => array( 224 304 'description' => __( 'Executes in the content section. Genesis uses this hook to output the loop.', 'genesis-simple-hooks' ), 225 305 'unhook' => array( 'genesis_do_loop' ), 226 306 ), 227 'genesis_after_loop' => array(307 'genesis_after_loop' => array( 228 308 'description' => __( 'Executes after the loop.', 'genesis-simple-hooks' ), 229 309 ), … … 232 312 'unhook' => array( 'genesis_posts_nav' ), 233 313 ), 234 'genesis_loop_else' => array(314 'genesis_loop_else' => array( 235 315 'description' => __( "Executes in the loop's else statement.", 'genesis-simple-hooks' ), 236 316 'unhook' => array( 'genesis_do_noposts' ), 237 317 ), 238 'genesis_reset_loops' => array(318 'genesis_reset_loops' => array( 239 319 'description' => __( 'Executes if the loop actions are reset.', 'genesis-simple-hooks' ), 240 320 ), … … 245 325 */ 246 326 $this->entry_hooks = array( 247 'genesis_before_entry' => array(327 'genesis_before_entry' => array( 248 328 'description' => __( 'Executes before the entry.', 'genesis-simple-hooks' ), 249 329 ), 250 'genesis_entry_header' => array(330 'genesis_entry_header' => array( 251 331 'description' => __( 'Executes as part of the entry. Genesis uses this hook to output the entry header.', 'genesis-simple-hooks' ), 252 332 'unhook' => array( 'genesis_do_post_title' ), … … 256 336 'unhook' => array( 'genesis_do_post_content' ), 257 337 ), 258 'genesis_entry_content' => array(338 'genesis_entry_content' => array( 259 339 'description' => __( 'Executes as part of the entry. Genesis uses this hook to output the entry content.', 'genesis-simple-hooks' ), 260 340 'unhook' => array( 'genesis_do_post_content' ), 261 341 ), 262 'genesis_after_entry_content' => array(342 'genesis_after_entry_content' => array( 263 343 'description' => __( 'Executes after the entry content', 'genesis-simple-hooks' ), 264 344 'unhook' => array( 'genesis_do_post_content' ), 265 345 ), 266 'genesis_entry_footer' => array(346 'genesis_entry_footer' => array( 267 347 'description' => __( 'Executes as part of the entry. Genesis uses this hook to output the entry footer.', 'genesis-simple-hooks' ), 268 348 'unhook' => array( 'genesis_post_meta' ), 269 349 ), 270 'genesis_after_entry' => array(350 'genesis_after_entry' => array( 271 351 'description' => __( 'Executes after the entry.', 'genesis-simple-hooks' ), 272 352 'unhook' => array( 'genesis_adjacent_entry_nav', 'genesis_get_comments_template' ), … … 275 355 276 356 /** 277 * xHTML post hooks357 * The xHTML post hooks 278 358 */ 279 359 $this->post_hooks = array( 280 'genesis_before_post' => array(360 'genesis_before_post' => array( 281 361 'description' => __( 'Executes before the post opening markup.', 'genesis-simple-hooks' ), 282 362 ), 283 'genesis_after_post' => array(363 'genesis_after_post' => array( 284 364 'description' => __( 'Executes after the post closing markup.', 'genesis-simple-hooks' ), 285 365 'unhook' => array( 'genesis_do_author_box_single', 'genesis_get_comments_template' ), 286 366 ), 287 'genesis_before_post_title' => array(367 'genesis_before_post_title' => array( 288 368 'description' => __( 'Executes before the post title.', 'genesis-simple-hooks' ), 289 369 'unhook' => array( 'genesis_do_post_format_image' ), 290 370 ), 291 'genesis_post_title' => array(371 'genesis_post_title' => array( 292 372 'description' => __( 'Executes as part of the post. Genesis uses this hook to output the post title.', 'genesis-simple-hooks' ), 293 373 'unhook' => array( 'genesis_do_post_title' ), 294 374 ), 295 'genesis_after_post_title' => array(375 'genesis_after_post_title' => array( 296 376 'description' => __( 'Executes after the post title.', 'genesis-simple-hooks' ), 297 377 ), … … 300 380 'unhook' => array( 'genesis_post_info' ), 301 381 ), 302 'genesis_post_content' => array(382 'genesis_post_content' => array( 303 383 'description' => __( 'Executes as part of the post. Genesis uses this hook to output the post content.', 'genesis-simple-hooks' ), 304 384 'unhook' => array( 'genesis_do_post_image', 'genesis_do_post_content', 'genesis_do_post_permalink', 'genesis_do_post_content_nav' ), 305 385 ), 306 'genesis_after_post_content' => array(386 'genesis_after_post_content' => array( 307 387 'description' => __( 'Executes after the post content.', 'genesis-simple-hooks' ), 308 388 'unhook' => array( 'genesis_post_meta' ), … … 311 391 312 392 $this->comment_hooks = array( 313 'genesis_before_comments' => array(393 'genesis_before_comments' => array( 314 394 'description' => __( 'Executes before the comments section opening markup.', 'genesis-simple-hooks' ), 315 395 ), 316 'genesis_comments' => array(396 'genesis_comments' => array( 317 397 'description' => __( 'Executes after an entry. Genesis uses this hook to output the comments section.', 'genesis-simple-hooks' ), 318 398 'unhook' => array( 'genesis_do_comments' ), 319 399 ), 320 'genesis_list_comments' => array(400 'genesis_list_comments' => array( 321 401 'description' => __( 'Executes in the comments section. Genesis uses this hook to output the comment list.', 'genesis-simple-hooks' ), 322 402 'unhook' => array( 'genesis_default_list_comments' ), 323 403 ), 324 'genesis_after_comments' => array(404 'genesis_after_comments' => array( 325 405 'description' => __( 'Executes after the comments section closing markup.', 'genesis-simple-hooks' ), 326 406 ), 327 'genesis_before_pings' => array(407 'genesis_before_pings' => array( 328 408 'description' => __( 'Executes before the pings section opening markup.', 'genesis-simple-hooks' ), 329 409 ), 330 'genesis_pings' => array(410 'genesis_pings' => array( 331 411 'description' => __( 'Executes after an entry. Genesis uses this hook to output the pings section.', 'genesis-simple-hooks' ), 332 412 'unhook' => array( 'genesis_do_pings' ), 333 413 ), 334 'genesis_list_pings' => array(414 'genesis_list_pings' => array( 335 415 'description' => __( 'Executes in the pings section. Genesis uses this hook to output the ping list.', 'genesis-simple-hooks' ), 336 416 'unhook' => array( 'genesis_default_list_pings' ), 337 417 ), 338 'genesis_after_pings' => array(418 'genesis_after_pings' => array( 339 419 'description' => __( 'Executes after the ping section closing markup.', 'genesis-simple-hooks' ), 340 420 ), 341 'genesis_before_comment' => array(421 'genesis_before_comment' => array( 342 422 'description' => __( 'Executes before a single comment.', 'genesis-simple-hooks' ), 343 423 ), 344 'genesis_comment' => array(424 'genesis_comment' => array( 345 425 'description' => __( 'Executes in the comment list. Genesis uses this hook to output a single comment.', 'genesis-simple-hooks' ), 346 426 ), 347 'genesis_after_comment' => array(427 'genesis_after_comment' => array( 348 428 'description' => __( 'Executes after a single comment.', 'genesis-simple-hooks' ), 349 429 ), … … 351 431 'description' => __( 'Executes before the comment form.', 'genesis-simple-hooks' ), 352 432 ), 353 'genesis_comment_form' => array(433 'genesis_comment_form' => array( 354 434 'description' => __( 'Executes after the comment and ping list. Genesis uses this hook to output the comment form.', 'genesis-simple-hooks' ), 355 435 'unhook' => array( 'genesis_do_comment_form' ), 356 436 ), 357 'genesis_after_comment_form' => array(437 'genesis_after_comment_form' => array( 358 438 'description' => __( 'Executes after the comment form.', 'genesis-simple-hooks' ), 359 439 ), … … 361 441 362 442 $this->sidebar_hooks = array( 363 'genesis_before_sidebar' => array(443 'genesis_before_sidebar' => array( 364 444 'description' => __( 'Executes before the primary sidebar.', 'genesis-simple-hooks' ), 365 445 ), 366 'genesis_sidebar' => array(446 'genesis_sidebar' => array( 367 447 'description' => __( 'Executes after the content section in 2+ column layouts. Genesis uses this hook to output the primary sidebar.', 'genesis-simple-hooks' ), 368 448 'unhook' => array( 'genesis_do_sidebar' ), 369 449 ), 370 'genesis_after_sidebar' => array(450 'genesis_after_sidebar' => array( 371 451 'description' => __( 'Executes after the primary sidebar.', 'genesis-simple-hooks' ), 372 452 ), 373 'genesis_before_sidebar_widget_area' => array(453 'genesis_before_sidebar_widget_area' => array( 374 454 'description' => __( 'Executes before the primary sidebar widget area.', 'genesis-simple-hooks' ), 375 455 ), 376 'genesis_after_sidebar_widget_area' => array(456 'genesis_after_sidebar_widget_area' => array( 377 457 'description' => __( 'Executes after the primary sidebar widget area.', 'genesis-simple-hooks' ), 378 458 ), 379 'genesis_before_sidebar_alt' => array(459 'genesis_before_sidebar_alt' => array( 380 460 'description' => __( 'Executes before the secondary sidebar.', 'genesis-simple-hooks' ), 381 461 ), 382 'genesis_sidebar_alt' => array(462 'genesis_sidebar_alt' => array( 383 463 'description' => __( 'Executes after the primary sidebar in 3+ column layouts. Genesis uses this hook to output the secondary sidebar.', 'genesis-simple-hooks' ), 384 464 'unhook' => array( 'genesis_do_sidebar_alt' ), 385 465 ), 386 'genesis_after_sidebar_alt' => array(466 'genesis_after_sidebar_alt' => array( 387 467 'description' => __( 'Executes after the secondary sidebar.', 'genesis-simple-hooks' ), 388 468 ), … … 390 470 'description' => __( 'Executes before the secondary sidebar widget area.', 'genesis-simple-hooks' ), 391 471 ), 392 'genesis_after_sidebar_alt_widget_area' => array(472 'genesis_after_sidebar_alt_widget_area' => array( 393 473 'description' => __( 'Executes after the secondary sidebar widget area.', 'genesis-simple-hooks' ), 394 474 ), … … 399 479 'description' => __( 'Executes before the site footer.', 'genesis-simple-hooks' ), 400 480 ), 401 'genesis_footer' => array(481 'genesis_footer' => array( 402 482 'description' => __( 'Executes after the content and sidebars. Genesis uses this hook to output the site footer.', 'genesis-simple-hooks' ), 403 483 'unhook' => array( 'genesis_do_footer' ), 404 484 ), 405 'genesis_after_footer' => array(485 'genesis_after_footer' => array( 406 486 'description' => __( 'Executes after the site footer.', 'genesis-simple-hooks' ), 407 487 ), … … 409 489 410 490 $this->admin_hooks = array( 411 'genesis_import_export_form' => array(491 'genesis_import_export_form' => array( 412 492 'description' => __( 'Executes after the form on the the import/export screen.', 'genesis-simple-hooks' ), 413 493 ), 414 'genesis_export' => array(494 'genesis_export' => array( 415 495 'description' => __( 'Executes during the export function.', 'genesis-simple-hooks' ), 416 496 ), 417 'genesis_import' => array(497 'genesis_import' => array( 418 498 'description' => __( 'Executes during the import function.', 'genesis-simple-hooks' ), 419 499 ), … … 421 501 'description' => __( 'Executes in the function that adds metaboxes to the theme settings screen.', 'genesis-simple-hooks' ), 422 502 ), 423 'genesis_upgrade' => array(503 'genesis_upgrade' => array( 424 504 'description' => __( 'Executes after Genesis upgrades itself.', 'genesis-simple-hooks' ), 425 505 'unhook' => array( 'genesis_upgrade_redirect' ), … … 436 516 public function get_default_settings() { 437 517 438 return array_fill_keys( $this->get_hooks(), array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ) ); 518 return array_fill_keys( 519 $this->get_hooks(), 520 array( 521 'content' => '', 522 'php' => 0, 523 'shortcodes' => 0, 524 ) 525 ); 439 526 440 527 } … … 447 534 public function get_hooks() { 448 535 449 // Merge all hooks arrays 536 // Merge all hooks arrays. 450 537 $hooks = array_merge( 451 538 $this->wp_hooks, … … 462 549 ); 463 550 464 // Just the keys 551 // Just the keys. 465 552 $hooks = array_keys( $hooks ); 466 553 … … 473 560 * 474 561 * @since 2.2.0 562 * 563 * @param Array $hooks Hooks. 475 564 */ 476 565 public function generate_form_markup_from_hooks( $hooks ) { … … 478 567 foreach ( (array) $hooks as $hook => $info ) { 479 568 480 // Check for existence in hooks array 481 if ( ! in_array( $hook, $this->get_hooks() ) ) {569 // Check for existence in hooks array. 570 if ( ! in_array( $hook, $this->get_hooks(), true ) ) { 482 571 continue; 483 572 } 484 573 485 printf( '<h4><code>%s</code> %s</h4>', esc_html( $hook ), __( 'Hook', 'genesis-simple-hooks') );486 printf( '<p><span class="description">%s</span></p>', $info['description']);574 printf( '<h4><code>%s</code> %s</h4>', esc_html( $hook ), esc_html( __( 'Hook', 'genesis-simple-hooks' ) ) ); 575 printf( '<p><span class="description">%s</span></p>', esc_html( $info['description'] ) ); 487 576 488 577 if ( isset( $info['unhook'] ) ) { 489 578 $allowed_html = array( 579 'a' => array( 580 'href' => array(), 581 'target' => array(), 582 ), 583 ); 490 584 foreach ( (array) $info['unhook'] as $function ) { 491 585 printf( … … 494 588 $this->settings_field . "[{$hook}][unhook][]", 495 589 $function, 496 in_array( $function, (array) simplehooks_get_option( $hook, 'unhook' ) ) ? 'checked' : '', 497 sprintf( __( 'Unhook <code>%s()</code> function from this hook?', 'genesis-simple-hooks' ), $function ) 590 in_array( $function, (array) simplehooks_get_option( $hook, 'unhook' ), true ) ? 'checked' : '', 591 // Translators: The string is the name of a function. 592 sprintf( wp_kses( __( 'Unhook <code>%s()</code> function from this hook?', 'genesis-simple-hooks' ), $allowed_html ), esc_html( $function ) ) 498 593 ); 499 594 } 500 501 595 } 502 596 503 597 printf( 504 598 '<p><textarea name="%s" cols="70" rows="5">%s</textarea></p>', 505 $this->settings_field . "[{$hook}][content]",506 htmlentities( simplehooks_get_option( $hook, 'content' ), ENT_QUOTES, 'UTF-8')599 esc_attr( $this->settings_field . "[{$hook}][content]" ), 600 esc_html( htmlentities( simplehooks_get_option( $hook, 'content' ), ENT_QUOTES, 'UTF-8' ) ) 507 601 ); 508 602 … … 511 605 printf( 512 606 '<input type="checkbox" name="%1$s" id="%1$s" value="1" %2$s/> <label for="%1$s">%3$s</label><br />', 513 $this->settings_field . "[{$hook}][shortcodes]",607 esc_attr( $this->settings_field . "[{$hook}][shortcodes]" ), 514 608 checked( 1, simplehooks_get_option( $hook, 'shortcodes' ), 0 ), 515 __( 'Execute Shortcodes on this hook?', 'genesis-simple-hooks')609 esc_html( __( 'Execute Shortcodes on this hook?', 'genesis-simple-hooks' ) ) 516 610 ); 517 611 … … 519 613 printf( 520 614 '<input type="checkbox" name="%1$s" id="%1$s" value="1" %2$s/> <label for="%1$s">%3$s</label><br />', 521 $this->settings_field . "[{$hook}][php]",615 esc_attr( $this->settings_field . "[{$hook}][php]" ), 522 616 checked( 1, simplehooks_get_option( $hook, 'php' ), 0 ), 523 __( 'Execute PHP on this hook?', 'genesis-simple-hooks')617 esc_html( __( 'Execute PHP on this hook?', 'genesis-simple-hooks' ) ) 524 618 ); 525 619 } … … 534 628 535 629 /** 536 * Register meta boxes on the Simple Hooks Settings page. 537 * 538 * @since 1.8.0 539 * 540 */ 630 * Register meta boxes on the Simple Hooks Settings page. 631 * 632 * @since 1.8.0 633 */ 541 634 public function metaboxes() { 542 635 … … 547 640 add_meta_box( 'simplehooks-loop-hooks', __( 'Loop Hooks', 'genesis-simple-hooks' ), array( $this, 'loop_hooks_box' ), $this->pagehook, 'main' ); 548 641 549 if ( current_theme_supports( 'html5' ) ) 642 if ( current_theme_supports( 'html5' ) ) { 550 643 add_meta_box( 'simplehooks-entry-hooks', __( 'Entry Hooks', 'genesis-simple-hooks' ), array( $this, 'html5_entry_hooks_box' ), $this->pagehook, 'main' ); 551 else644 } else { 552 645 add_meta_box( 'simplehooks-post-hooks', __( 'Post/Page Hooks', 'genesis-simple-hooks' ), array( $this, 'post_hooks_box' ), $this->pagehook, 'main' ); 646 } 553 647 554 648 add_meta_box( 'simplehooks-comment-hooks', __( 'Comment Hooks', 'genesis-simple-hooks' ), array( $this, 'comment_hooks_box' ), $this->pagehook, 'main' ); … … 558 652 } 559 653 654 /** 655 * WP Hooks Box 656 */ 560 657 public function wp_hooks_box() { 561 658 … … 566 663 } 567 664 665 /** 666 * Internal Hooks Box 667 */ 568 668 public function internal_hooks_box() { 569 669 … … 574 674 } 575 675 676 /** 677 * Document Hooks Box 678 */ 576 679 public function document_hooks_box() { 577 680 … … 582 685 } 583 686 687 /** 688 * Header Hooks Box 689 */ 584 690 public function header_hooks_box() { 585 691 … … 590 696 } 591 697 698 /** 699 * Content Hooks Box 700 */ 592 701 public function content_hooks_box() { 593 702 … … 598 707 } 599 708 709 /** 710 * Loop Hooks Box 711 */ 600 712 public function loop_hooks_box() { 601 713 … … 606 718 } 607 719 720 /** 721 * HTML5 Entry Hooks Box 722 */ 608 723 public function html5_entry_hooks_box() { 609 724 … … 614 729 } 615 730 731 /** 732 * Post Hooks Box 733 */ 616 734 public function post_hooks_box() { 617 735 … … 622 740 } 623 741 742 /** 743 * Comment Hooks Box 744 */ 624 745 public function comment_hooks_box() { 625 746 … … 630 751 } 631 752 753 /** 754 * Sidebar Hooks Box 755 */ 632 756 public function sidebar_hooks_box() { 633 757 … … 638 762 } 639 763 764 /** 765 * Footer Hooks Box 766 */ 640 767 public function footer_hooks_box() { 641 768 -
genesis-simple-hooks/tags/2.3.0/includes/deprecated.php
r1611304 r2134959 1 1 <?php 2 /** 3 * A deprecated instance of simple hooks 4 * 5 * @package genesis-simple-hooks 6 */ 2 7 3 8 /** -
genesis-simple-hooks/tags/2.3.0/includes/functions.php
r1611304 r2134959 1 1 <?php 2 /** 3 * Additional Functions for Simple Hooks 4 * 5 * @package genesis-simple-hooks 6 */ 2 7 3 8 /** … … 5 10 * 6 11 * @since 0.1 12 * 13 * @param Array $hook Hook. 14 * @param Array $field Field. 15 * @param Array $all All. 7 16 */ 8 17 function simplehooks_get_option( $hook = null, $field = null, $all = false ) { … … 16 25 } 17 26 18 if ( ! array_key_exists( $hook, (array) $options ) ) 27 if ( ! array_key_exists( $hook, (array) $options ) ) { 19 28 return ''; 29 } 20 30 21 $option = isset( $options[ $hook][$field] ) ? $options[$hook][$field] : '';31 $option = isset( $options[ $hook ][ $field ] ) ? $options[ $hook ][ $field ] : ''; 22 32 23 33 return wp_kses_stripslashes( wp_kses_decode_entities( $option ) ); … … 28 38 * 29 39 * @since 0.1 40 * 41 * @param Array $hook Hook. 42 * @param Array $field Field. 30 43 */ 31 function simplehooks_option( $hook = null, $field = null) {44 function simplehooks_option( $hook = null, $field = null ) { 32 45 46 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 33 47 echo simplehooks_get_option( $hook, $field ); 34 48 -
genesis-simple-hooks/tags/2.3.0/languages/genesis-simple-hooks.pot
r1611304 r2134959 1 # Copyright (C) 201 72 # This file is distributed under the same license as the package.1 # Copyright (C) 2019 StudioPress 2 # This file is distributed under the same license as the Genesis Simple Hooks plugin. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: \n"5 "Project-Id-Version: Genesis Simple Hooks 2.3.0\n" 6 6 "Report-Msgid-Bugs-To: StudioPress <[email protected]>\n" 7 "POT-Creation-Date: 2017-03-09 03:54:49+00:00\n" 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 8 "Language-Team: LANGUAGE <[email protected]>\n" 8 9 "MIME-Version: 1.0\n" 9 "Content-Type: text/plain; charset= utf-8\n"10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 11 "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n" 12 "Last-Translator: StudioPress <[email protected]>\n" 13 "Language-Team: English <[email protected]>\n" 14 "X-Generator: grunt-wp-i18n 0.4.4\n" 15 "Plural-Forms: nplurals=2; plural=n != 1;\n" 16 "X-Poedit-Basepath: .\n" 17 "X-Poedit-Language: English\n" 18 "X-Poedit-Country: UNITED STATES\n" 19 "X-Poedit-SourceCharset: utf-8\n" 20 "X-Poedit-KeywordsList: " 21 "__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_" 22 "attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n" 23 "X-Poedit-Bookmarks: \n" 24 "X-Poedit-SearchPath-0: .\n" 25 "X-Textdomain-Support: yes\n" 26 27 #: genesis-simple-hooks.php:87 28 msgid "upgrade to" 29 msgstr "" 30 31 #: genesis-simple-hooks.php:87 32 msgid "install and activate" 33 msgstr "" 34 35 #: genesis-simple-hooks.php:89 36 msgid "" 37 "Genesis Simple Hooks requires WordPress %s and Genesis %s, or greater. " 38 "Please %s the latest version of <a href=\"%s\" " 39 "target=\"_blank\">Genesis</a> to use this plugin." 40 msgstr "" 41 42 #: includes/class-genesis-simple-hooks-admin.php:82 12 "POT-Creation-Date: 2019-08-02T15:09:40+00:00\n" 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.2.0\n" 15 "X-Domain: genesis-simple-hooks\n" 16 17 #. Plugin Name of the plugin 18 msgid "Genesis Simple Hooks" 19 msgstr "" 20 21 #. Plugin URI of the plugin 22 msgid "http://www.studiopress.com/plugins/simple-hooks" 23 msgstr "" 24 25 #. Description of the plugin 26 msgid "Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme." 27 msgstr "" 28 29 #. Author of the plugin 30 msgid "StudioPress" 31 msgstr "" 32 33 #. Author URI of the plugin 34 msgid "http://www.studiopress.com/" 35 msgstr "" 36 37 #: includes/class-genesis-simple-hooks-admin.php:161 43 38 msgid "Genesis - Simple Hooks" 44 39 msgstr "" 45 40 46 #: includes/class-genesis-simple-hooks-admin.php: 8341 #: includes/class-genesis-simple-hooks-admin.php:162 47 42 msgid "Simple Hooks" 48 43 msgstr "" 49 44 50 #: includes/class-genesis-simple-hooks-admin.php: 15045 #: includes/class-genesis-simple-hooks-admin.php:230 51 46 msgid "Executes immediately before the closing <code></head></code> tag." 52 47 msgstr "" 53 48 54 #: includes/class-genesis-simple-hooks-admin.php: 15455 #: includes/class-genesis-simple-hooks-admin.php: 17649 #: includes/class-genesis-simple-hooks-admin.php:234 50 #: includes/class-genesis-simple-hooks-admin.php:256 56 51 msgid "Executes immediately before the closing <code></body></code> tag." 57 52 msgstr "" 58 53 59 #: includes/class-genesis-simple-hooks-admin.php: 16154 #: includes/class-genesis-simple-hooks-admin.php:241 60 55 msgid "Executes in the document head. Genesis uses this to output the doctype." 61 56 msgstr "" 62 57 63 #: includes/class-genesis-simple-hooks-admin.php:165 64 msgid "" 65 "Executes in the document head. Genesis uses this to output the document " 66 "title." 67 msgstr "" 68 69 #: includes/class-genesis-simple-hooks-admin.php:169 58 #: includes/class-genesis-simple-hooks-admin.php:245 59 msgid "Executes in the document head. Genesis uses this to output the document title." 60 msgstr "" 61 62 #: includes/class-genesis-simple-hooks-admin.php:249 70 63 msgid "Executes in the document head. Genesis uses this to output meta tags." 71 64 msgstr "" 72 65 73 #: includes/class-genesis-simple-hooks-admin.php: 17366 #: includes/class-genesis-simple-hooks-admin.php:253 74 67 msgid "Executes immediately after the opening <code><body></code> tag." 75 68 msgstr "" 76 69 77 #: includes/class-genesis-simple-hooks-admin.php: 18270 #: includes/class-genesis-simple-hooks-admin.php:262 78 71 msgid "Executes immediately before the header." 79 72 msgstr "" 80 73 81 #: includes/class-genesis-simple-hooks-admin.php: 18574 #: includes/class-genesis-simple-hooks-admin.php:265 82 75 msgid "Genesis uses this hook to output the default header." 83 76 msgstr "" 84 77 85 #: includes/class-genesis-simple-hooks-admin.php: 18978 #: includes/class-genesis-simple-hooks-admin.php:269 86 79 msgid "Executes inside the page header, immediately before the header widget area." 87 80 msgstr "" 88 81 89 #: includes/class-genesis-simple-hooks-admin.php: 19282 #: includes/class-genesis-simple-hooks-admin.php:272 90 83 msgid "Executes immediately after the header." 91 84 msgstr "" 92 85 93 #: includes/class-genesis-simple-hooks-admin.php: 19586 #: includes/class-genesis-simple-hooks-admin.php:275 94 87 msgid "Executes inside the header. Genesis uses this hook to output the site title." 95 88 msgstr "" 96 89 97 #: includes/class-genesis-simple-hooks-admin.php:199 98 msgid "" 99 "Executes inside the header. Genesis uses this hook to output the site " 100 "description." 101 msgstr "" 102 103 #: includes/class-genesis-simple-hooks-admin.php:206 90 #: includes/class-genesis-simple-hooks-admin.php:279 91 msgid "Executes inside the header. Genesis uses this hook to output the site description." 92 msgstr "" 93 94 #: includes/class-genesis-simple-hooks-admin.php:286 104 95 msgid "Executes before the content-sidebar-wrap opening markup." 105 96 msgstr "" 106 97 107 #: includes/class-genesis-simple-hooks-admin.php:2 0998 #: includes/class-genesis-simple-hooks-admin.php:289 108 99 msgid "Executes after the content-sidebar-wrap closing markup." 109 100 msgstr "" 110 101 111 #: includes/class-genesis-simple-hooks-admin.php:2 12102 #: includes/class-genesis-simple-hooks-admin.php:292 112 103 msgid "Executes before the content opening markup." 113 104 msgstr "" 114 105 115 #: includes/class-genesis-simple-hooks-admin.php:2 15106 #: includes/class-genesis-simple-hooks-admin.php:295 116 107 msgid "Executes after the content closing markup." 117 108 msgstr "" 118 109 119 #: includes/class-genesis-simple-hooks-admin.php: 221110 #: includes/class-genesis-simple-hooks-admin.php:301 120 111 msgid "Executes before the loop." 121 112 msgstr "" 122 113 123 #: includes/class-genesis-simple-hooks-admin.php: 224114 #: includes/class-genesis-simple-hooks-admin.php:304 124 115 msgid "Executes in the content section. Genesis uses this hook to output the loop." 125 116 msgstr "" 126 117 127 #: includes/class-genesis-simple-hooks-admin.php: 228118 #: includes/class-genesis-simple-hooks-admin.php:308 128 119 msgid "Executes after the loop." 129 120 msgstr "" 130 121 131 #: includes/class-genesis-simple-hooks-admin.php: 231122 #: includes/class-genesis-simple-hooks-admin.php:311 132 123 msgid "Executes after the WordPress loop endwhile." 133 124 msgstr "" 134 125 135 #: includes/class-genesis-simple-hooks-admin.php: 235126 #: includes/class-genesis-simple-hooks-admin.php:315 136 127 msgid "Executes in the loop's else statement." 137 128 msgstr "" 138 129 139 #: includes/class-genesis-simple-hooks-admin.php: 239130 #: includes/class-genesis-simple-hooks-admin.php:319 140 131 msgid "Executes if the loop actions are reset." 141 132 msgstr "" 142 133 143 #: includes/class-genesis-simple-hooks-admin.php: 248134 #: includes/class-genesis-simple-hooks-admin.php:328 144 135 msgid "Executes before the entry." 145 136 msgstr "" 146 137 147 #: includes/class-genesis-simple-hooks-admin.php:251 148 msgid "" 149 "Executes as part of the entry. Genesis uses this hook to output the entry " 150 "header." 151 msgstr "" 152 153 #: includes/class-genesis-simple-hooks-admin.php:255 138 #: includes/class-genesis-simple-hooks-admin.php:331 139 msgid "Executes as part of the entry. Genesis uses this hook to output the entry header." 140 msgstr "" 141 142 #: includes/class-genesis-simple-hooks-admin.php:335 154 143 msgid "Executes before the entry content" 155 144 msgstr "" 156 145 157 #: includes/class-genesis-simple-hooks-admin.php:259 158 msgid "" 159 "Executes as part of the entry. Genesis uses this hook to output the entry " 160 "content." 161 msgstr "" 162 163 #: includes/class-genesis-simple-hooks-admin.php:263 146 #: includes/class-genesis-simple-hooks-admin.php:339 147 msgid "Executes as part of the entry. Genesis uses this hook to output the entry content." 148 msgstr "" 149 150 #: includes/class-genesis-simple-hooks-admin.php:343 164 151 msgid "Executes after the entry content" 165 152 msgstr "" 166 153 167 #: includes/class-genesis-simple-hooks-admin.php:267 168 msgid "" 169 "Executes as part of the entry. Genesis uses this hook to output the entry " 170 "footer." 171 msgstr "" 172 173 #: includes/class-genesis-simple-hooks-admin.php:271 154 #: includes/class-genesis-simple-hooks-admin.php:347 155 msgid "Executes as part of the entry. Genesis uses this hook to output the entry footer." 156 msgstr "" 157 158 #: includes/class-genesis-simple-hooks-admin.php:351 174 159 msgid "Executes after the entry." 175 160 msgstr "" 176 161 177 #: includes/class-genesis-simple-hooks-admin.php: 281162 #: includes/class-genesis-simple-hooks-admin.php:361 178 163 msgid "Executes before the post opening markup." 179 164 msgstr "" 180 165 181 #: includes/class-genesis-simple-hooks-admin.php: 284166 #: includes/class-genesis-simple-hooks-admin.php:364 182 167 msgid "Executes after the post closing markup." 183 168 msgstr "" 184 169 185 #: includes/class-genesis-simple-hooks-admin.php: 288170 #: includes/class-genesis-simple-hooks-admin.php:368 186 171 msgid "Executes before the post title." 187 172 msgstr "" 188 173 189 #: includes/class-genesis-simple-hooks-admin.php:292 190 msgid "" 191 "Executes as part of the post. Genesis uses this hook to output the post " 192 "title." 193 msgstr "" 194 195 #: includes/class-genesis-simple-hooks-admin.php:296 174 #: includes/class-genesis-simple-hooks-admin.php:372 175 msgid "Executes as part of the post. Genesis uses this hook to output the post title." 176 msgstr "" 177 178 #: includes/class-genesis-simple-hooks-admin.php:376 196 179 msgid "Executes after the post title." 197 180 msgstr "" 198 181 199 #: includes/class-genesis-simple-hooks-admin.php: 299182 #: includes/class-genesis-simple-hooks-admin.php:379 200 183 msgid "Executes before the post content." 201 184 msgstr "" 202 185 203 #: includes/class-genesis-simple-hooks-admin.php:303 204 msgid "" 205 "Executes as part of the post. Genesis uses this hook to output the post " 206 "content." 207 msgstr "" 208 209 #: includes/class-genesis-simple-hooks-admin.php:307 186 #: includes/class-genesis-simple-hooks-admin.php:383 187 msgid "Executes as part of the post. Genesis uses this hook to output the post content." 188 msgstr "" 189 190 #: includes/class-genesis-simple-hooks-admin.php:387 210 191 msgid "Executes after the post content." 211 192 msgstr "" 212 193 213 #: includes/class-genesis-simple-hooks-admin.php:3 14194 #: includes/class-genesis-simple-hooks-admin.php:394 214 195 msgid "Executes before the comments section opening markup." 215 196 msgstr "" 216 197 217 #: includes/class-genesis-simple-hooks-admin.php:317 218 msgid "" 219 "Executes after an entry. Genesis uses this hook to output the comments " 220 "section." 221 msgstr "" 222 223 #: includes/class-genesis-simple-hooks-admin.php:321 224 msgid "" 225 "Executes in the comments section. Genesis uses this hook to output the " 226 "comment list." 227 msgstr "" 228 229 #: includes/class-genesis-simple-hooks-admin.php:325 198 #: includes/class-genesis-simple-hooks-admin.php:397 199 msgid "Executes after an entry. Genesis uses this hook to output the comments section." 200 msgstr "" 201 202 #: includes/class-genesis-simple-hooks-admin.php:401 203 msgid "Executes in the comments section. Genesis uses this hook to output the comment list." 204 msgstr "" 205 206 #: includes/class-genesis-simple-hooks-admin.php:405 230 207 msgid "Executes after the comments section closing markup." 231 208 msgstr "" 232 209 233 #: includes/class-genesis-simple-hooks-admin.php: 328210 #: includes/class-genesis-simple-hooks-admin.php:408 234 211 msgid "Executes before the pings section opening markup." 235 212 msgstr "" 236 213 237 #: includes/class-genesis-simple-hooks-admin.php: 331214 #: includes/class-genesis-simple-hooks-admin.php:411 238 215 msgid "Executes after an entry. Genesis uses this hook to output the pings section." 239 216 msgstr "" 240 217 241 #: includes/class-genesis-simple-hooks-admin.php:335 242 msgid "" 243 "Executes in the pings section. Genesis uses this hook to output the ping " 244 "list." 245 msgstr "" 246 247 #: includes/class-genesis-simple-hooks-admin.php:339 218 #: includes/class-genesis-simple-hooks-admin.php:415 219 msgid "Executes in the pings section. Genesis uses this hook to output the ping list." 220 msgstr "" 221 222 #: includes/class-genesis-simple-hooks-admin.php:419 248 223 msgid "Executes after the ping section closing markup." 249 224 msgstr "" 250 225 251 #: includes/class-genesis-simple-hooks-admin.php: 342226 #: includes/class-genesis-simple-hooks-admin.php:422 252 227 msgid "Executes before a single comment." 253 228 msgstr "" 254 229 255 #: includes/class-genesis-simple-hooks-admin.php:345 256 msgid "" 257 "Executes in the comment list. Genesis uses this hook to output a single " 258 "comment." 259 msgstr "" 260 261 #: includes/class-genesis-simple-hooks-admin.php:348 230 #: includes/class-genesis-simple-hooks-admin.php:425 231 msgid "Executes in the comment list. Genesis uses this hook to output a single comment." 232 msgstr "" 233 234 #: includes/class-genesis-simple-hooks-admin.php:428 262 235 msgid "Executes after a single comment." 263 236 msgstr "" 264 237 265 #: includes/class-genesis-simple-hooks-admin.php: 351238 #: includes/class-genesis-simple-hooks-admin.php:431 266 239 msgid "Executes before the comment form." 267 240 msgstr "" 268 241 269 #: includes/class-genesis-simple-hooks-admin.php:354 270 msgid "" 271 "Executes after the comment and ping list. Genesis uses this hook to output " 272 "the comment form." 273 msgstr "" 274 275 #: includes/class-genesis-simple-hooks-admin.php:358 242 #: includes/class-genesis-simple-hooks-admin.php:434 243 msgid "Executes after the comment and ping list. Genesis uses this hook to output the comment form." 244 msgstr "" 245 246 #: includes/class-genesis-simple-hooks-admin.php:438 276 247 msgid "Executes after the comment form." 277 248 msgstr "" 278 249 279 #: includes/class-genesis-simple-hooks-admin.php: 364250 #: includes/class-genesis-simple-hooks-admin.php:444 280 251 msgid "Executes before the primary sidebar." 281 252 msgstr "" 282 253 283 #: includes/class-genesis-simple-hooks-admin.php:367 284 msgid "" 285 "Executes after the content section in 2+ column layouts. Genesis uses this " 286 "hook to output the primary sidebar." 287 msgstr "" 288 289 #: includes/class-genesis-simple-hooks-admin.php:371 254 #: includes/class-genesis-simple-hooks-admin.php:447 255 msgid "Executes after the content section in 2+ column layouts. Genesis uses this hook to output the primary sidebar." 256 msgstr "" 257 258 #: includes/class-genesis-simple-hooks-admin.php:451 290 259 msgid "Executes after the primary sidebar." 291 260 msgstr "" 292 261 293 #: includes/class-genesis-simple-hooks-admin.php: 374262 #: includes/class-genesis-simple-hooks-admin.php:454 294 263 msgid "Executes before the primary sidebar widget area." 295 264 msgstr "" 296 265 297 #: includes/class-genesis-simple-hooks-admin.php: 377266 #: includes/class-genesis-simple-hooks-admin.php:457 298 267 msgid "Executes after the primary sidebar widget area." 299 268 msgstr "" 300 269 301 #: includes/class-genesis-simple-hooks-admin.php: 380270 #: includes/class-genesis-simple-hooks-admin.php:460 302 271 msgid "Executes before the secondary sidebar." 303 272 msgstr "" 304 273 305 #: includes/class-genesis-simple-hooks-admin.php:383 306 msgid "" 307 "Executes after the primary sidebar in 3+ column layouts. Genesis uses this " 308 "hook to output the secondary sidebar." 309 msgstr "" 310 311 #: includes/class-genesis-simple-hooks-admin.php:387 274 #: includes/class-genesis-simple-hooks-admin.php:463 275 msgid "Executes after the primary sidebar in 3+ column layouts. Genesis uses this hook to output the secondary sidebar." 276 msgstr "" 277 278 #: includes/class-genesis-simple-hooks-admin.php:467 312 279 msgid "Executes after the secondary sidebar." 313 280 msgstr "" 314 281 315 #: includes/class-genesis-simple-hooks-admin.php: 390282 #: includes/class-genesis-simple-hooks-admin.php:470 316 283 msgid "Executes before the secondary sidebar widget area." 317 284 msgstr "" 318 285 319 #: includes/class-genesis-simple-hooks-admin.php: 393286 #: includes/class-genesis-simple-hooks-admin.php:473 320 287 msgid "Executes after the secondary sidebar widget area." 321 288 msgstr "" 322 289 323 #: includes/class-genesis-simple-hooks-admin.php: 399290 #: includes/class-genesis-simple-hooks-admin.php:479 324 291 msgid "Executes before the site footer." 325 292 msgstr "" 326 293 327 #: includes/class-genesis-simple-hooks-admin.php:402 328 msgid "" 329 "Executes after the content and sidebars. Genesis uses this hook to output " 330 "the site footer." 331 msgstr "" 332 333 #: includes/class-genesis-simple-hooks-admin.php:406 294 #: includes/class-genesis-simple-hooks-admin.php:482 295 msgid "Executes after the content and sidebars. Genesis uses this hook to output the site footer." 296 msgstr "" 297 298 #: includes/class-genesis-simple-hooks-admin.php:486 334 299 msgid "Executes after the site footer." 335 300 msgstr "" 336 301 337 #: includes/class-genesis-simple-hooks-admin.php:4 12302 #: includes/class-genesis-simple-hooks-admin.php:492 338 303 msgid "Executes after the form on the the import/export screen." 339 304 msgstr "" 340 305 341 #: includes/class-genesis-simple-hooks-admin.php:4 15306 #: includes/class-genesis-simple-hooks-admin.php:495 342 307 msgid "Executes during the export function." 343 308 msgstr "" 344 309 345 #: includes/class-genesis-simple-hooks-admin.php:4 18310 #: includes/class-genesis-simple-hooks-admin.php:498 346 311 msgid "Executes during the import function." 347 312 msgstr "" 348 313 349 #: includes/class-genesis-simple-hooks-admin.php: 421314 #: includes/class-genesis-simple-hooks-admin.php:501 350 315 msgid "Executes in the function that adds metaboxes to the theme settings screen." 351 316 msgstr "" 352 317 353 #: includes/class-genesis-simple-hooks-admin.php: 424318 #: includes/class-genesis-simple-hooks-admin.php:504 354 319 msgid "Executes after Genesis upgrades itself." 355 320 msgstr "" 356 321 357 #: includes/class-genesis-simple-hooks-admin.php: 485322 #: includes/class-genesis-simple-hooks-admin.php:574 358 323 msgid "Hook" 359 324 msgstr "" 360 325 361 #: includes/class-genesis-simple-hooks-admin.php:497 326 #. Translators: The string is the name of a function. 327 #: includes/class-genesis-simple-hooks-admin.php:592 362 328 msgid "Unhook <code>%s()</code> function from this hook?" 363 329 msgstr "" 364 330 365 #: includes/class-genesis-simple-hooks-admin.php: 515331 #: includes/class-genesis-simple-hooks-admin.php:609 366 332 msgid "Execute Shortcodes on this hook?" 367 333 msgstr "" 368 334 369 #: includes/class-genesis-simple-hooks-admin.php: 523335 #: includes/class-genesis-simple-hooks-admin.php:617 370 336 msgid "Execute PHP on this hook?" 371 337 msgstr "" 372 338 373 #: includes/class-genesis-simple-hooks-admin.php: 543339 #: includes/class-genesis-simple-hooks-admin.php:636 374 340 msgid "WordPress Hooks" 375 341 msgstr "" 376 342 377 #: includes/class-genesis-simple-hooks-admin.php: 544343 #: includes/class-genesis-simple-hooks-admin.php:637 378 344 msgid "Document Hooks" 379 345 msgstr "" 380 346 381 #: includes/class-genesis-simple-hooks-admin.php: 545347 #: includes/class-genesis-simple-hooks-admin.php:638 382 348 msgid "Header Hooks" 383 349 msgstr "" 384 350 385 #: includes/class-genesis-simple-hooks-admin.php: 546351 #: includes/class-genesis-simple-hooks-admin.php:639 386 352 msgid "Content Hooks" 387 353 msgstr "" 388 354 389 #: includes/class-genesis-simple-hooks-admin.php: 547355 #: includes/class-genesis-simple-hooks-admin.php:640 390 356 msgid "Loop Hooks" 391 357 msgstr "" 392 358 393 #: includes/class-genesis-simple-hooks-admin.php: 550359 #: includes/class-genesis-simple-hooks-admin.php:643 394 360 msgid "Entry Hooks" 395 361 msgstr "" 396 362 397 #: includes/class-genesis-simple-hooks-admin.php: 552363 #: includes/class-genesis-simple-hooks-admin.php:645 398 364 msgid "Post/Page Hooks" 399 365 msgstr "" 400 366 401 #: includes/class-genesis-simple-hooks-admin.php: 554367 #: includes/class-genesis-simple-hooks-admin.php:648 402 368 msgid "Comment Hooks" 403 369 msgstr "" 404 370 405 #: includes/class-genesis-simple-hooks-admin.php: 555371 #: includes/class-genesis-simple-hooks-admin.php:649 406 372 msgid "Sidebar Hooks" 407 373 msgstr "" 408 374 409 #: includes/class-genesis-simple-hooks-admin.php: 556375 #: includes/class-genesis-simple-hooks-admin.php:650 410 376 msgid "Footer Hooks" 411 377 msgstr "" 412 378 413 #: includes/class-genesis-simple-hooks-admin.php: 564414 #: includes/class-genesis-simple-hooks-admin.php: 572415 #: includes/class-genesis-simple-hooks-admin.php: 580416 #: includes/class-genesis-simple-hooks-admin.php: 588417 #: includes/class-genesis-simple-hooks-admin.php: 596418 #: includes/class-genesis-simple-hooks-admin.php: 604419 #: includes/class-genesis-simple-hooks-admin.php: 612420 #: includes/class-genesis-simple-hooks-admin.php: 620421 #: includes/class-genesis-simple-hooks-admin.php: 628422 #: includes/class-genesis-simple-hooks-admin.php: 636423 #: includes/class-genesis-simple-hooks-admin.php: 644379 #: includes/class-genesis-simple-hooks-admin.php:661 380 #: includes/class-genesis-simple-hooks-admin.php:672 381 #: includes/class-genesis-simple-hooks-admin.php:683 382 #: includes/class-genesis-simple-hooks-admin.php:694 383 #: includes/class-genesis-simple-hooks-admin.php:705 384 #: includes/class-genesis-simple-hooks-admin.php:716 385 #: includes/class-genesis-simple-hooks-admin.php:727 386 #: includes/class-genesis-simple-hooks-admin.php:738 387 #: includes/class-genesis-simple-hooks-admin.php:749 388 #: includes/class-genesis-simple-hooks-admin.php:760 389 #: includes/class-genesis-simple-hooks-admin.php:771 424 390 msgid "Save Changes" 425 391 msgstr "" -
genesis-simple-hooks/tags/2.3.0/package.json
r1831101 r2134959 7 7 }, 8 8 "dependencies": {}, 9 "devDependencies": { 10 "grunt": "*", 11 "grunt-autoprefixer": "*", 12 "grunt-checktextdomain": "*", 13 "grunt-contrib-cssmin": "*", 14 "grunt-contrib-imagemin": "*", 15 "grunt-contrib-jshint": "*", 16 "grunt-contrib-uglify": "*", 17 "grunt-contrib-watch": "*", 18 "grunt-csscomb": "*", 19 "grunt-jsbeautifier": "*", 20 "grunt-jsvalidate": "*", 21 "grunt-phplint": "*", 22 "grunt-styledocco": "*", 23 "grunt-wp-i18n": "*", 24 "load-grunt-tasks": "*" 9 "scripts": { 10 "makepot": "composer makepot" 25 11 }, 26 12 "plugin": { … … 30 16 "author": "StudioPress", 31 17 "authoruri": "http://www.studiopress.com/", 32 "version": "2. 2.1",18 "version": "2.3.0", 33 19 "license": "GPL-2.0+", 34 20 "licenseuri": "http://www.gnu.org/licenses/gpl-2.0.html", -
genesis-simple-hooks/tags/2.3.0/plugin.php
r1831101 r2134959 1 <?php 2 /* 3 Plugin Name: Genesis Simple Hooks 4 Plugin URI: http://www.studiopress.com/plugins/simple-hooks 1 <?php //phpcs:ignore 2 /** 3 * Plugin Name: Genesis Simple Hooks 4 * Plugin URI: http://www.studiopress.com/plugins/simple-hooks 5 * 6 * Description: Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme. 7 * 8 * Author: StudioPress 9 * Author URI: http://www.studiopress.com/ 10 * 11 * Version: 2.3.0 12 * 13 * Text Domain: genesis-simple-hooks 14 * Domain Path: /languages 15 * 16 * License: GNU General Public License v2.0 (or later) 17 * License URI: http://www.opensource.org/licenses/gpl-license.php 18 */ 5 19 6 Description: Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme. 7 8 Author: StudioPress 9 Author URI: http://www.studiopress.com/ 10 11 Version: 2.2.1 12 13 Text Domain: genesis-simple-hooks 14 Domain Path: /languages 15 16 License: GNU General Public License v2.0 (or later) 17 License URI: http://www.opensource.org/licenses/gpl-license.php 18 */ 19 20 require_once( plugin_dir_path( __FILE__ ) . 'genesis-simple-hooks.php' ); 20 require_once plugin_dir_path( __FILE__ ) . 'genesis-simple-hooks.php'; -
genesis-simple-hooks/tags/2.3.0/readme.txt
r1831159 r2134959 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5553118 4 4 Tags: hooks, genesis, genesiswp, studiopress 5 Requires at least: 4. 9.06 Tested up to: 4.9.47 Stable tag: 2. 2.15 Requires at least: 4.7.2 6 Tested up to: 5.2.2 7 Stable tag: 2.3.0 8 8 9 9 This plugin creates a new Genesis settings page that allows you to insert code (HTML, Shortcodes, and PHP), and attach it to any of the 50+ action hooks throughout the Genesis Theme Framework, from StudioPress. … … 48 48 ` 49 49 <div class="post-info"> 50 <span class="time"><?php the_time('F j, Y'); ?></span> <span class="author">by <?php the_author_posts_link(); ?></span> <span class="post-comments"><a href="<?php the_permalink(); ?>#respond"><?php comments_number('Leave a Comment', '1 Comment', '% Comments'); ?></a></span> <a class="post-edit-link"><?php edit_post_link('(Edit)', '', ''); ?></a> 50 <span class="time"><?php the_time('F j, Y'); ?></span> <span class="author">by <?php the_author_posts_link(); ?></span> <span class="post-comments"><a href="<?php the_permalink(); ?>#respond"><?php comments_number('Leave a Comment', '1 Comment', '% Comments'); ?></a></span> <a class="post-edit-link"><?php edit_post_link('(Edit)', '', ''); ?></a> 51 51 </div> 52 52 ` … … 55 55 ` 56 56 <div class="post-meta"> 57 <span class="categories">Filed under: <?php the_category(', ') ?></span> <span class="tags">Tagged with <?php the_tags('') ?></span> 57 <span class="categories">Filed under: <?php the_category(', ') ?></span> <span class="tags">Tagged with <?php the_tags('') ?></span> 58 58 </div> 59 59 ` … … 72 72 73 73 == Changelog == 74 75 = 2.3.0 = 76 * Reorganize plugin based on our standard boilerplate. 77 * Update to match WordPress PHP standards. 78 * Fix bug where plugin name was empty in the minimum version warning. 79 * Increase minimum Genesis version to 2.5.0. 74 80 75 81 = 2.2.1 = … … 150 156 = 0.1 = 151 157 * Initial Release 152 153 154 155 156 157 158 159 -
genesis-simple-hooks/trunk/genesis-simple-hooks.php
r1831101 r2134959 1 1 <?php 2 /** 3 * This file handles the creation of the Simple Hooks admin menu. 4 * 5 * @package genesis-simple-hooks 6 */ 2 7 3 class Genesis_Simple_Hooks { 8 define( 'GENESIS_SIMPLE_HOOKS_DIR', plugin_dir_path( __FILE__ ) ); 9 define( 'GENESIS_SIMPLE_HOOKS_URL', plugins_url( '', __FILE__ ) ); 10 define( 'GENESIS_SIMPLE_HOOKS_VERSION', '2.3.0' ); 4 11 5 /** 6 * Plugin version 7 */ 8 public $plugin_version = '2.2.1'; 9 10 /** 11 * Minimum WordPress version. 12 */ 13 public $min_wp_version = '4.7.2'; 14 15 /** 16 * Minimum Genesis version. 17 */ 18 public $min_genesis_version = '2.4.2'; 19 20 /** 21 * The plugin textdomain, for translations. 22 */ 23 public $plugin_textdomain = 'genesis-simple-hooks'; 24 25 /** 26 * The url to the plugin directory. 27 */ 28 public $plugin_dir_url; 29 30 /** 31 * The path to the plugin directory. 32 */ 33 public $plugin_dir_path; 34 35 /** 36 * The main settings field for this plugin. 37 */ 38 public $settings_field = 'simplehooks-settings'; 39 40 /** 41 * Admin menu and settings page. 42 */ 43 public $admin; 44 45 /** 46 * Constructor. 47 * 48 * @since 2.2.0 49 */ 50 public function __construct() { 51 52 $this->plugin_dir_url = plugin_dir_url( __FILE__ ); 53 $this->plugin_dir_path = plugin_dir_path( __FILE__ ); 54 55 // For backward compatibility 56 define( 'SIMPLEHOOKS_PLUGIN_DIR', $this->plugin_dir_path ); 57 58 } 59 60 /** 61 * Initialize. 62 * 63 * @since 2.2.0 64 */ 65 public function init() { 66 67 $this->load_plugin_textdomain(); 68 69 add_action( 'admin_notices', array( $this, 'requirements_notice' ) ); 70 71 // Because this is a Genesis-dependent plugin 72 add_action( 'genesis_setup', array( $this, 'includes' ) ); 73 add_action( 'genesis_admin_init', array( $this, 'instantiate' ) ); 74 add_action( 'genesis_setup', array( $this, 'execute_hooks' ) ); 75 76 } 77 78 /** 79 * Show admin notice if minimum requirements aren't met. 80 * 81 * @since 2.2.0 82 */ 83 public function requirements_notice() { 84 85 if ( ! defined( 'PARENT_THEME_VERSION' ) || ! version_compare( PARENT_THEME_VERSION, $this->min_genesis_version, '>=' ) ) { 86 87 $plugin = get_plugin_data( $this->plugin_dir_path . 'plugin.php' ); 88 89 $action = defined( 'PARENT_THEME_VERSION' ) ? __( 'upgrade to', 'plugin-boilerplate' ) : __( 'install and activate', 'plugin-boilerplate' ); 90 91 $message = sprintf( __( '%s requires WordPress %s and <a href="%s" target="_blank">Genesis %s</a>, or greater. Please %s the latest version of Genesis to use this plugin.', 'plugin-boilerplate' ), $plugin['name'], $this->min_wp_version, 'http://my.studiopress.com/?download_id=91046d629e74d525b3f2978e404e7ffa', $this->min_genesis_version, $action ); 92 echo '<div class="notice notice-warning"><p>' . $message . '</p></div>'; 93 94 } 95 96 } 97 98 /** 99 * Load the plugin textdomain, for translation. 100 * 101 * @since 2.2.0 102 */ 103 public function load_plugin_textdomain() { 104 load_plugin_textdomain( 'genesis-simple-hooks', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); 105 } 106 107 /** 108 * All general includes. 109 * 110 * @since 2.2.0 111 */ 112 public function includes() { 113 114 require_once( $this->plugin_dir_path . 'includes/functions.php' ); 115 require_once( $this->plugin_dir_path . 'includes/deprecated.php' ); 116 117 } 118 119 /** 120 * Include the class file, instantiate the classes, create objects. 121 * 122 * @since 2.2.0 123 */ 124 public function instantiate() { 125 126 require_once( $this->plugin_dir_path . 'includes/class-genesis-simple-hooks-admin.php' ); 127 $this->admin = new Genesis_Simple_Hooks_Admin; 128 $this->admin->init(); 129 130 } 131 132 /** 133 * Helper function to retrieve the static object without using globals. 134 * 135 * @since 2.2.0 136 */ 137 public function execute_hooks() { 138 139 $hooks = get_option( $this->settings_field ); 140 141 //print_r( $hooks ); 142 143 foreach ( (array) $hooks as $hook => $array ) { 144 145 // Add new content to hook 146 if ( ! empty( $array['content'] ) ) { 147 add_action( $hook, array( $this, 'execute_hook' ) ); 148 } 149 150 // Unhook stuff 151 if ( isset( $array['unhook'] ) ) { 152 153 foreach( (array) $array['unhook'] as $function ) { 154 remove_action( $hook, $function ); 155 } 156 157 } 158 159 } 160 161 } 162 163 /** 164 * The following function executes any code meant to be hooked. 165 * It checks to see if shortcodes or PHP should be executed as well. 166 * 167 * @uses simplehooks_get_option() 168 * 169 * @since 2.2.0 170 */ 171 public function execute_hook() { 172 173 $hook = current_filter(); 174 $content = simplehooks_get_option( $hook, 'content' ); 175 176 if ( ! $hook || ! $content ) { 177 return; 178 } 179 180 $shortcodes = simplehooks_get_option( $hook, 'shortcodes' ); 181 $php = simplehooks_get_option( $hook, 'php' ); 182 183 $value = $shortcodes ? do_shortcode( $content ) : $content; 184 185 if ( $php ) { 186 eval( "?>$value " ); 187 } else { 188 echo $value; 189 } 190 191 } 192 193 } 12 require_once GENESIS_SIMPLE_HOOKS_DIR . '/includes/class-genesis-simple-hooks.php'; 194 13 195 14 /** … … 198 17 * @since 0.9.0 199 18 */ 200 function Genesis_Simple_Hooks() {19 function genesis_simple_hooks() { 201 20 202 21 static $object; 203 22 204 if ( null == $object ) {205 $object = new Genesis_Simple_Hooks ;23 if ( null === $object ) { 24 $object = new Genesis_Simple_Hooks(); 206 25 } 207 26 … … 209 28 } 210 29 /** 211 * Initialize the object on `plugins_loaded`.30 * Initialize the object on `plugins_loaded`. 212 31 */ 213 32 add_action( 'plugins_loaded', array( Genesis_Simple_Hooks(), 'init' ) ); -
genesis-simple-hooks/trunk/includes/class-genesis-simple-hooks-admin.php
r1831101 r2134959 2 2 /** 3 3 * This file handles the creation of the Simple Hooks admin menu. 4 * 5 * @package genesis-simple-hooks 4 6 */ 5 6 7 7 8 /** … … 17 18 * 18 19 * @since 2.2.0 20 * 21 * @var $settings_field Settings Field 19 22 */ 20 23 public $settings_field = 'simplehooks-settings'; 21 24 25 /** 26 * WP Hooks. 27 * 28 * @since 2.2.0 29 * 30 * @var $wp_hooks WP Hooks 31 */ 22 32 public $wp_hooks; 23 33 34 /** 35 * Document Hooks. 36 * 37 * @since 2.2.0 38 * 39 * @var $document_hooks Document Hooks 40 */ 24 41 public $document_hooks; 25 42 43 /** 44 * Header Hooks. 45 * 46 * @since 2.2.0 47 * 48 * @var $header_hooks Header Hooks 49 */ 26 50 public $header_hooks; 27 51 52 /** 53 * Content Hooks. 54 * 55 * @since 2.2.0 56 * 57 * @var $content_hooks Content Hooks 58 */ 28 59 public $content_hooks; 29 60 61 /** 62 * Loop Hooks. 63 * 64 * @since 2.2.0 65 * 66 * @var $loop_hooks Loop Hooks 67 */ 30 68 public $loop_hooks; 31 69 70 /** 71 * Entry Hooks. 72 * 73 * @since 2.2.0 74 * 75 * @var $settings_field Entry Hooks 76 */ 32 77 public $entry_hooks; 33 78 79 /** 80 * Post Hooks. 81 * 82 * @since 2.2.0 83 * 84 * @var $settings_field Post Hooks 85 */ 34 86 public $post_hooks; 35 87 88 /** 89 * Comment Hooks. 90 * 91 * @since 2.2.0 92 * 93 * @var $comment_hooks Comment Hooks 94 */ 36 95 public $comment_hooks; 37 96 97 /** 98 * Sidebar Hooks. 99 * 100 * @since 2.2.0 101 * 102 * @var $sidebar_hooks Sidebar Hooks 103 */ 38 104 public $sidebar_hooks; 39 105 106 /** 107 * Footer Hooks. 108 * 109 * @since 2.2.0 110 * 111 * @var $footer_hooks Footer Hooks 112 */ 40 113 public $footer_hooks; 41 114 115 /** 116 * Admin Hooks. 117 * 118 * @since 2.2.0 119 * 120 * @var $admin_hooks Admin Hooks 121 */ 42 122 public $admin_hooks; 43 123 … … 46 126 * 47 127 * @since 1.8.0 48 *49 128 */ 50 129 public function __construct() { 51 130 52 // For backward compatibility 131 // For backward compatibility. 53 132 define( 'SIMPLEHOOKS_SETTINGS_FIELD', $this->settings_field ); 54 133 … … 81 160 'parent_slug' => 'genesis', 82 161 'page_title' => __( 'Genesis - Simple Hooks', 'genesis-simple-hooks' ), 83 'menu_title' => __( 'Simple Hooks', 'genesis-simple-hooks' ) 84 ) 162 'menu_title' => __( 'Simple Hooks', 'genesis-simple-hooks' ), 163 ), 85 164 ); 86 165 … … 89 168 ); 90 169 91 // Create the page 170 // Create the page. 92 171 $this->create( $page_id, $menu_ops, $page_ops, $this->settings_field, $this->get_default_settings() ); 93 172 … … 98 177 * 99 178 * @since 1.8.0 100 *101 179 */ 102 180 public function scripts() { 103 181 104 // Load parent scripts as well as Genesis admin scripts */182 // Load parent scripts as well as Genesis admin scripts. 105 183 parent::scripts(); 106 184 genesis_scripts()->enqueue_and_localize_admin_scripts(); … … 112 190 * 113 191 * @since 2.2.0 192 * 193 * @param Array $newvalue New value. 194 * @param Array $oldvalue Old value. 114 195 */ 115 196 public function save( $newvalue, $oldvalue ) { … … 132 213 133 214 } 134 135 215 } 136 216 … … 147 227 148 228 $this->wp_hooks = array( 149 'wp_head' => array(229 'wp_head' => array( 150 230 'description' => __( 'Executes immediately before the closing <code></head></code> tag.', 'genesis-simple-hooks' ), 151 231 'unhook' => array( 'genesis_load_favicon', 'genesis_do_meta_pingback', 'genesis_paged_rel', 'genesis_meta_name', 'genesis_meta_url', 'genesis_header_scripts', 'genesis_custom_header_style' ), … … 162 242 'unhook' => array( 'genesis_do_doctype' ), 163 243 ), 164 'genesis_title' => array(244 'genesis_title' => array( 165 245 'description' => __( 'Executes in the document head. Genesis uses this to output the document title.', 'genesis-simple-hooks' ), 166 246 'unhook' => array( 'genesis_do_title' ), 167 247 ), 168 'genesis_meta' => array(248 'genesis_meta' => array( 169 249 'description' => __( 'Executes in the document head. Genesis uses this to output meta tags.', 'genesis-simple-hooks' ), 170 'unhook' => array( 'genesis_seo_meta_description', 'genesis_seo_meta_keywords', 'genesis_robots_meta', 'genesis_responsive_viewport' ,),171 ), 172 'genesis_before' => array(250 'unhook' => array( 'genesis_seo_meta_description', 'genesis_seo_meta_keywords', 'genesis_robots_meta', 'genesis_responsive_viewport' ), 251 ), 252 'genesis_before' => array( 173 253 'description' => __( 'Executes immediately after the opening <code><body></code> tag.', 'genesis-simple-hooks' ), 174 254 ), 175 'genesis_after' => array(255 'genesis_after' => array( 176 256 'description' => __( 'Executes immediately before the closing <code></body></code> tag.', 'genesis-simple-hooks' ), 177 257 ), … … 179 259 180 260 $this->header_hooks = array( 181 'genesis_before_header' => array(182 'description' => __( 'Executes immediately before the header.', 'genesis-simple-hooks' ) 183 ), 184 'genesis_header' => array(261 'genesis_before_header' => array( 262 'description' => __( 'Executes immediately before the header.', 'genesis-simple-hooks' ), 263 ), 264 'genesis_header' => array( 185 265 'description' => __( 'Genesis uses this hook to output the default header.', 'genesis-simple-hooks' ), 186 266 'unhook' => array( 'genesis_do_header' ), 187 267 ), 188 'genesis_header_right' => array(268 'genesis_header_right' => array( 189 269 'description' => __( 'Executes inside the page header, immediately before the header widget area.', 'genesis-simple-hooks' ), 190 270 ), 191 'genesis_after_header' => array(192 'description' => __( 'Executes immediately after the header.', 'genesis-simple-hooks' ) 193 ), 194 'genesis_site_title' => array(195 'description' => __( 'Executes inside the header. Genesis uses this hook to output the site title.' , 'genesis-simple-hooks' ),271 'genesis_after_header' => array( 272 'description' => __( 'Executes immediately after the header.', 'genesis-simple-hooks' ), 273 ), 274 'genesis_site_title' => array( 275 'description' => __( 'Executes inside the header. Genesis uses this hook to output the site title.', 'genesis-simple-hooks' ), 196 276 'unhook' => array( 'genesis_seo_site_title' ), 197 277 ), 198 278 'genesis_site_description' => array( 199 'description' => __( 'Executes inside the header. Genesis uses this hook to output the site description.' , 'genesis-simple-hooks' ),279 'description' => __( 'Executes inside the header. Genesis uses this hook to output the site description.', 'genesis-simple-hooks' ), 200 280 'unhook' => array( 'genesis_seo_site_description' ), 201 281 ), … … 206 286 'description' => __( 'Executes before the content-sidebar-wrap opening markup.', 'genesis-simple-hooks' ), 207 287 ), 208 'genesis_after_content_sidebar_wrap' => array(288 'genesis_after_content_sidebar_wrap' => array( 209 289 'description' => __( 'Executes after the content-sidebar-wrap closing markup.', 'genesis-simple-hooks' ), 210 290 ), 211 'genesis_before_content' => array(291 'genesis_before_content' => array( 212 292 'description' => __( 'Executes before the content opening markup.', 'genesis-simple-hooks' ), 213 293 ), 214 'genesis_after_content' => array(294 'genesis_after_content' => array( 215 295 'description' => __( 'Executes after the content closing markup.', 'genesis-simple-hooks' ), 216 296 ), … … 218 298 219 299 $this->loop_hooks = array( 220 'genesis_before_loop' => array(300 'genesis_before_loop' => array( 221 301 'description' => __( 'Executes before the loop.', 'genesis-simple-hooks' ), 222 302 ), 223 'genesis_loop' => array(303 'genesis_loop' => array( 224 304 'description' => __( 'Executes in the content section. Genesis uses this hook to output the loop.', 'genesis-simple-hooks' ), 225 305 'unhook' => array( 'genesis_do_loop' ), 226 306 ), 227 'genesis_after_loop' => array(307 'genesis_after_loop' => array( 228 308 'description' => __( 'Executes after the loop.', 'genesis-simple-hooks' ), 229 309 ), … … 232 312 'unhook' => array( 'genesis_posts_nav' ), 233 313 ), 234 'genesis_loop_else' => array(314 'genesis_loop_else' => array( 235 315 'description' => __( "Executes in the loop's else statement.", 'genesis-simple-hooks' ), 236 316 'unhook' => array( 'genesis_do_noposts' ), 237 317 ), 238 'genesis_reset_loops' => array(318 'genesis_reset_loops' => array( 239 319 'description' => __( 'Executes if the loop actions are reset.', 'genesis-simple-hooks' ), 240 320 ), … … 245 325 */ 246 326 $this->entry_hooks = array( 247 'genesis_before_entry' => array(327 'genesis_before_entry' => array( 248 328 'description' => __( 'Executes before the entry.', 'genesis-simple-hooks' ), 249 329 ), 250 'genesis_entry_header' => array(330 'genesis_entry_header' => array( 251 331 'description' => __( 'Executes as part of the entry. Genesis uses this hook to output the entry header.', 'genesis-simple-hooks' ), 252 332 'unhook' => array( 'genesis_do_post_title' ), … … 256 336 'unhook' => array( 'genesis_do_post_content' ), 257 337 ), 258 'genesis_entry_content' => array(338 'genesis_entry_content' => array( 259 339 'description' => __( 'Executes as part of the entry. Genesis uses this hook to output the entry content.', 'genesis-simple-hooks' ), 260 340 'unhook' => array( 'genesis_do_post_content' ), 261 341 ), 262 'genesis_after_entry_content' => array(342 'genesis_after_entry_content' => array( 263 343 'description' => __( 'Executes after the entry content', 'genesis-simple-hooks' ), 264 344 'unhook' => array( 'genesis_do_post_content' ), 265 345 ), 266 'genesis_entry_footer' => array(346 'genesis_entry_footer' => array( 267 347 'description' => __( 'Executes as part of the entry. Genesis uses this hook to output the entry footer.', 'genesis-simple-hooks' ), 268 348 'unhook' => array( 'genesis_post_meta' ), 269 349 ), 270 'genesis_after_entry' => array(350 'genesis_after_entry' => array( 271 351 'description' => __( 'Executes after the entry.', 'genesis-simple-hooks' ), 272 352 'unhook' => array( 'genesis_adjacent_entry_nav', 'genesis_get_comments_template' ), … … 275 355 276 356 /** 277 * xHTML post hooks357 * The xHTML post hooks 278 358 */ 279 359 $this->post_hooks = array( 280 'genesis_before_post' => array(360 'genesis_before_post' => array( 281 361 'description' => __( 'Executes before the post opening markup.', 'genesis-simple-hooks' ), 282 362 ), 283 'genesis_after_post' => array(363 'genesis_after_post' => array( 284 364 'description' => __( 'Executes after the post closing markup.', 'genesis-simple-hooks' ), 285 365 'unhook' => array( 'genesis_do_author_box_single', 'genesis_get_comments_template' ), 286 366 ), 287 'genesis_before_post_title' => array(367 'genesis_before_post_title' => array( 288 368 'description' => __( 'Executes before the post title.', 'genesis-simple-hooks' ), 289 369 'unhook' => array( 'genesis_do_post_format_image' ), 290 370 ), 291 'genesis_post_title' => array(371 'genesis_post_title' => array( 292 372 'description' => __( 'Executes as part of the post. Genesis uses this hook to output the post title.', 'genesis-simple-hooks' ), 293 373 'unhook' => array( 'genesis_do_post_title' ), 294 374 ), 295 'genesis_after_post_title' => array(375 'genesis_after_post_title' => array( 296 376 'description' => __( 'Executes after the post title.', 'genesis-simple-hooks' ), 297 377 ), … … 300 380 'unhook' => array( 'genesis_post_info' ), 301 381 ), 302 'genesis_post_content' => array(382 'genesis_post_content' => array( 303 383 'description' => __( 'Executes as part of the post. Genesis uses this hook to output the post content.', 'genesis-simple-hooks' ), 304 384 'unhook' => array( 'genesis_do_post_image', 'genesis_do_post_content', 'genesis_do_post_permalink', 'genesis_do_post_content_nav' ), 305 385 ), 306 'genesis_after_post_content' => array(386 'genesis_after_post_content' => array( 307 387 'description' => __( 'Executes after the post content.', 'genesis-simple-hooks' ), 308 388 'unhook' => array( 'genesis_post_meta' ), … … 311 391 312 392 $this->comment_hooks = array( 313 'genesis_before_comments' => array(393 'genesis_before_comments' => array( 314 394 'description' => __( 'Executes before the comments section opening markup.', 'genesis-simple-hooks' ), 315 395 ), 316 'genesis_comments' => array(396 'genesis_comments' => array( 317 397 'description' => __( 'Executes after an entry. Genesis uses this hook to output the comments section.', 'genesis-simple-hooks' ), 318 398 'unhook' => array( 'genesis_do_comments' ), 319 399 ), 320 'genesis_list_comments' => array(400 'genesis_list_comments' => array( 321 401 'description' => __( 'Executes in the comments section. Genesis uses this hook to output the comment list.', 'genesis-simple-hooks' ), 322 402 'unhook' => array( 'genesis_default_list_comments' ), 323 403 ), 324 'genesis_after_comments' => array(404 'genesis_after_comments' => array( 325 405 'description' => __( 'Executes after the comments section closing markup.', 'genesis-simple-hooks' ), 326 406 ), 327 'genesis_before_pings' => array(407 'genesis_before_pings' => array( 328 408 'description' => __( 'Executes before the pings section opening markup.', 'genesis-simple-hooks' ), 329 409 ), 330 'genesis_pings' => array(410 'genesis_pings' => array( 331 411 'description' => __( 'Executes after an entry. Genesis uses this hook to output the pings section.', 'genesis-simple-hooks' ), 332 412 'unhook' => array( 'genesis_do_pings' ), 333 413 ), 334 'genesis_list_pings' => array(414 'genesis_list_pings' => array( 335 415 'description' => __( 'Executes in the pings section. Genesis uses this hook to output the ping list.', 'genesis-simple-hooks' ), 336 416 'unhook' => array( 'genesis_default_list_pings' ), 337 417 ), 338 'genesis_after_pings' => array(418 'genesis_after_pings' => array( 339 419 'description' => __( 'Executes after the ping section closing markup.', 'genesis-simple-hooks' ), 340 420 ), 341 'genesis_before_comment' => array(421 'genesis_before_comment' => array( 342 422 'description' => __( 'Executes before a single comment.', 'genesis-simple-hooks' ), 343 423 ), 344 'genesis_comment' => array(424 'genesis_comment' => array( 345 425 'description' => __( 'Executes in the comment list. Genesis uses this hook to output a single comment.', 'genesis-simple-hooks' ), 346 426 ), 347 'genesis_after_comment' => array(427 'genesis_after_comment' => array( 348 428 'description' => __( 'Executes after a single comment.', 'genesis-simple-hooks' ), 349 429 ), … … 351 431 'description' => __( 'Executes before the comment form.', 'genesis-simple-hooks' ), 352 432 ), 353 'genesis_comment_form' => array(433 'genesis_comment_form' => array( 354 434 'description' => __( 'Executes after the comment and ping list. Genesis uses this hook to output the comment form.', 'genesis-simple-hooks' ), 355 435 'unhook' => array( 'genesis_do_comment_form' ), 356 436 ), 357 'genesis_after_comment_form' => array(437 'genesis_after_comment_form' => array( 358 438 'description' => __( 'Executes after the comment form.', 'genesis-simple-hooks' ), 359 439 ), … … 361 441 362 442 $this->sidebar_hooks = array( 363 'genesis_before_sidebar' => array(443 'genesis_before_sidebar' => array( 364 444 'description' => __( 'Executes before the primary sidebar.', 'genesis-simple-hooks' ), 365 445 ), 366 'genesis_sidebar' => array(446 'genesis_sidebar' => array( 367 447 'description' => __( 'Executes after the content section in 2+ column layouts. Genesis uses this hook to output the primary sidebar.', 'genesis-simple-hooks' ), 368 448 'unhook' => array( 'genesis_do_sidebar' ), 369 449 ), 370 'genesis_after_sidebar' => array(450 'genesis_after_sidebar' => array( 371 451 'description' => __( 'Executes after the primary sidebar.', 'genesis-simple-hooks' ), 372 452 ), 373 'genesis_before_sidebar_widget_area' => array(453 'genesis_before_sidebar_widget_area' => array( 374 454 'description' => __( 'Executes before the primary sidebar widget area.', 'genesis-simple-hooks' ), 375 455 ), 376 'genesis_after_sidebar_widget_area' => array(456 'genesis_after_sidebar_widget_area' => array( 377 457 'description' => __( 'Executes after the primary sidebar widget area.', 'genesis-simple-hooks' ), 378 458 ), 379 'genesis_before_sidebar_alt' => array(459 'genesis_before_sidebar_alt' => array( 380 460 'description' => __( 'Executes before the secondary sidebar.', 'genesis-simple-hooks' ), 381 461 ), 382 'genesis_sidebar_alt' => array(462 'genesis_sidebar_alt' => array( 383 463 'description' => __( 'Executes after the primary sidebar in 3+ column layouts. Genesis uses this hook to output the secondary sidebar.', 'genesis-simple-hooks' ), 384 464 'unhook' => array( 'genesis_do_sidebar_alt' ), 385 465 ), 386 'genesis_after_sidebar_alt' => array(466 'genesis_after_sidebar_alt' => array( 387 467 'description' => __( 'Executes after the secondary sidebar.', 'genesis-simple-hooks' ), 388 468 ), … … 390 470 'description' => __( 'Executes before the secondary sidebar widget area.', 'genesis-simple-hooks' ), 391 471 ), 392 'genesis_after_sidebar_alt_widget_area' => array(472 'genesis_after_sidebar_alt_widget_area' => array( 393 473 'description' => __( 'Executes after the secondary sidebar widget area.', 'genesis-simple-hooks' ), 394 474 ), … … 399 479 'description' => __( 'Executes before the site footer.', 'genesis-simple-hooks' ), 400 480 ), 401 'genesis_footer' => array(481 'genesis_footer' => array( 402 482 'description' => __( 'Executes after the content and sidebars. Genesis uses this hook to output the site footer.', 'genesis-simple-hooks' ), 403 483 'unhook' => array( 'genesis_do_footer' ), 404 484 ), 405 'genesis_after_footer' => array(485 'genesis_after_footer' => array( 406 486 'description' => __( 'Executes after the site footer.', 'genesis-simple-hooks' ), 407 487 ), … … 409 489 410 490 $this->admin_hooks = array( 411 'genesis_import_export_form' => array(491 'genesis_import_export_form' => array( 412 492 'description' => __( 'Executes after the form on the the import/export screen.', 'genesis-simple-hooks' ), 413 493 ), 414 'genesis_export' => array(494 'genesis_export' => array( 415 495 'description' => __( 'Executes during the export function.', 'genesis-simple-hooks' ), 416 496 ), 417 'genesis_import' => array(497 'genesis_import' => array( 418 498 'description' => __( 'Executes during the import function.', 'genesis-simple-hooks' ), 419 499 ), … … 421 501 'description' => __( 'Executes in the function that adds metaboxes to the theme settings screen.', 'genesis-simple-hooks' ), 422 502 ), 423 'genesis_upgrade' => array(503 'genesis_upgrade' => array( 424 504 'description' => __( 'Executes after Genesis upgrades itself.', 'genesis-simple-hooks' ), 425 505 'unhook' => array( 'genesis_upgrade_redirect' ), … … 436 516 public function get_default_settings() { 437 517 438 return array_fill_keys( $this->get_hooks(), array( 'content' => '', 'php' => 0, 'shortcodes' => 0 ) ); 518 return array_fill_keys( 519 $this->get_hooks(), 520 array( 521 'content' => '', 522 'php' => 0, 523 'shortcodes' => 0, 524 ) 525 ); 439 526 440 527 } … … 447 534 public function get_hooks() { 448 535 449 // Merge all hooks arrays 536 // Merge all hooks arrays. 450 537 $hooks = array_merge( 451 538 $this->wp_hooks, … … 462 549 ); 463 550 464 // Just the keys 551 // Just the keys. 465 552 $hooks = array_keys( $hooks ); 466 553 … … 473 560 * 474 561 * @since 2.2.0 562 * 563 * @param Array $hooks Hooks. 475 564 */ 476 565 public function generate_form_markup_from_hooks( $hooks ) { … … 478 567 foreach ( (array) $hooks as $hook => $info ) { 479 568 480 // Check for existence in hooks array 481 if ( ! in_array( $hook, $this->get_hooks() ) ) {569 // Check for existence in hooks array. 570 if ( ! in_array( $hook, $this->get_hooks(), true ) ) { 482 571 continue; 483 572 } 484 573 485 printf( '<h4><code>%s</code> %s</h4>', esc_html( $hook ), __( 'Hook', 'genesis-simple-hooks') );486 printf( '<p><span class="description">%s</span></p>', $info['description']);574 printf( '<h4><code>%s</code> %s</h4>', esc_html( $hook ), esc_html( __( 'Hook', 'genesis-simple-hooks' ) ) ); 575 printf( '<p><span class="description">%s</span></p>', esc_html( $info['description'] ) ); 487 576 488 577 if ( isset( $info['unhook'] ) ) { 489 578 $allowed_html = array( 579 'a' => array( 580 'href' => array(), 581 'target' => array(), 582 ), 583 ); 490 584 foreach ( (array) $info['unhook'] as $function ) { 491 585 printf( … … 494 588 $this->settings_field . "[{$hook}][unhook][]", 495 589 $function, 496 in_array( $function, (array) simplehooks_get_option( $hook, 'unhook' ) ) ? 'checked' : '', 497 sprintf( __( 'Unhook <code>%s()</code> function from this hook?', 'genesis-simple-hooks' ), $function ) 590 in_array( $function, (array) simplehooks_get_option( $hook, 'unhook' ), true ) ? 'checked' : '', 591 // Translators: The string is the name of a function. 592 sprintf( wp_kses( __( 'Unhook <code>%s()</code> function from this hook?', 'genesis-simple-hooks' ), $allowed_html ), esc_html( $function ) ) 498 593 ); 499 594 } 500 501 595 } 502 596 503 597 printf( 504 598 '<p><textarea name="%s" cols="70" rows="5">%s</textarea></p>', 505 $this->settings_field . "[{$hook}][content]",506 htmlentities( simplehooks_get_option( $hook, 'content' ), ENT_QUOTES, 'UTF-8')599 esc_attr( $this->settings_field . "[{$hook}][content]" ), 600 esc_html( htmlentities( simplehooks_get_option( $hook, 'content' ), ENT_QUOTES, 'UTF-8' ) ) 507 601 ); 508 602 … … 511 605 printf( 512 606 '<input type="checkbox" name="%1$s" id="%1$s" value="1" %2$s/> <label for="%1$s">%3$s</label><br />', 513 $this->settings_field . "[{$hook}][shortcodes]",607 esc_attr( $this->settings_field . "[{$hook}][shortcodes]" ), 514 608 checked( 1, simplehooks_get_option( $hook, 'shortcodes' ), 0 ), 515 __( 'Execute Shortcodes on this hook?', 'genesis-simple-hooks')609 esc_html( __( 'Execute Shortcodes on this hook?', 'genesis-simple-hooks' ) ) 516 610 ); 517 611 … … 519 613 printf( 520 614 '<input type="checkbox" name="%1$s" id="%1$s" value="1" %2$s/> <label for="%1$s">%3$s</label><br />', 521 $this->settings_field . "[{$hook}][php]",615 esc_attr( $this->settings_field . "[{$hook}][php]" ), 522 616 checked( 1, simplehooks_get_option( $hook, 'php' ), 0 ), 523 __( 'Execute PHP on this hook?', 'genesis-simple-hooks')617 esc_html( __( 'Execute PHP on this hook?', 'genesis-simple-hooks' ) ) 524 618 ); 525 619 } … … 534 628 535 629 /** 536 * Register meta boxes on the Simple Hooks Settings page. 537 * 538 * @since 1.8.0 539 * 540 */ 630 * Register meta boxes on the Simple Hooks Settings page. 631 * 632 * @since 1.8.0 633 */ 541 634 public function metaboxes() { 542 635 … … 547 640 add_meta_box( 'simplehooks-loop-hooks', __( 'Loop Hooks', 'genesis-simple-hooks' ), array( $this, 'loop_hooks_box' ), $this->pagehook, 'main' ); 548 641 549 if ( current_theme_supports( 'html5' ) ) 642 if ( current_theme_supports( 'html5' ) ) { 550 643 add_meta_box( 'simplehooks-entry-hooks', __( 'Entry Hooks', 'genesis-simple-hooks' ), array( $this, 'html5_entry_hooks_box' ), $this->pagehook, 'main' ); 551 else644 } else { 552 645 add_meta_box( 'simplehooks-post-hooks', __( 'Post/Page Hooks', 'genesis-simple-hooks' ), array( $this, 'post_hooks_box' ), $this->pagehook, 'main' ); 646 } 553 647 554 648 add_meta_box( 'simplehooks-comment-hooks', __( 'Comment Hooks', 'genesis-simple-hooks' ), array( $this, 'comment_hooks_box' ), $this->pagehook, 'main' ); … … 558 652 } 559 653 654 /** 655 * WP Hooks Box 656 */ 560 657 public function wp_hooks_box() { 561 658 … … 566 663 } 567 664 665 /** 666 * Internal Hooks Box 667 */ 568 668 public function internal_hooks_box() { 569 669 … … 574 674 } 575 675 676 /** 677 * Document Hooks Box 678 */ 576 679 public function document_hooks_box() { 577 680 … … 582 685 } 583 686 687 /** 688 * Header Hooks Box 689 */ 584 690 public function header_hooks_box() { 585 691 … … 590 696 } 591 697 698 /** 699 * Content Hooks Box 700 */ 592 701 public function content_hooks_box() { 593 702 … … 598 707 } 599 708 709 /** 710 * Loop Hooks Box 711 */ 600 712 public function loop_hooks_box() { 601 713 … … 606 718 } 607 719 720 /** 721 * HTML5 Entry Hooks Box 722 */ 608 723 public function html5_entry_hooks_box() { 609 724 … … 614 729 } 615 730 731 /** 732 * Post Hooks Box 733 */ 616 734 public function post_hooks_box() { 617 735 … … 622 740 } 623 741 742 /** 743 * Comment Hooks Box 744 */ 624 745 public function comment_hooks_box() { 625 746 … … 630 751 } 631 752 753 /** 754 * Sidebar Hooks Box 755 */ 632 756 public function sidebar_hooks_box() { 633 757 … … 638 762 } 639 763 764 /** 765 * Footer Hooks Box 766 */ 640 767 public function footer_hooks_box() { 641 768 -
genesis-simple-hooks/trunk/includes/deprecated.php
r1611304 r2134959 1 1 <?php 2 /** 3 * A deprecated instance of simple hooks 4 * 5 * @package genesis-simple-hooks 6 */ 2 7 3 8 /** -
genesis-simple-hooks/trunk/includes/functions.php
r1611304 r2134959 1 1 <?php 2 /** 3 * Additional Functions for Simple Hooks 4 * 5 * @package genesis-simple-hooks 6 */ 2 7 3 8 /** … … 5 10 * 6 11 * @since 0.1 12 * 13 * @param Array $hook Hook. 14 * @param Array $field Field. 15 * @param Array $all All. 7 16 */ 8 17 function simplehooks_get_option( $hook = null, $field = null, $all = false ) { … … 16 25 } 17 26 18 if ( ! array_key_exists( $hook, (array) $options ) ) 27 if ( ! array_key_exists( $hook, (array) $options ) ) { 19 28 return ''; 29 } 20 30 21 $option = isset( $options[ $hook][$field] ) ? $options[$hook][$field] : '';31 $option = isset( $options[ $hook ][ $field ] ) ? $options[ $hook ][ $field ] : ''; 22 32 23 33 return wp_kses_stripslashes( wp_kses_decode_entities( $option ) ); … … 28 38 * 29 39 * @since 0.1 40 * 41 * @param Array $hook Hook. 42 * @param Array $field Field. 30 43 */ 31 function simplehooks_option( $hook = null, $field = null) {44 function simplehooks_option( $hook = null, $field = null ) { 32 45 46 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 33 47 echo simplehooks_get_option( $hook, $field ); 34 48 -
genesis-simple-hooks/trunk/languages/genesis-simple-hooks.pot
r1611304 r2134959 1 # Copyright (C) 201 72 # This file is distributed under the same license as the package.1 # Copyright (C) 2019 StudioPress 2 # This file is distributed under the same license as the Genesis Simple Hooks plugin. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: \n"5 "Project-Id-Version: Genesis Simple Hooks 2.3.0\n" 6 6 "Report-Msgid-Bugs-To: StudioPress <[email protected]>\n" 7 "POT-Creation-Date: 2017-03-09 03:54:49+00:00\n" 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 8 "Language-Team: LANGUAGE <[email protected]>\n" 8 9 "MIME-Version: 1.0\n" 9 "Content-Type: text/plain; charset= utf-8\n"10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 11 "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n" 12 "Last-Translator: StudioPress <[email protected]>\n" 13 "Language-Team: English <[email protected]>\n" 14 "X-Generator: grunt-wp-i18n 0.4.4\n" 15 "Plural-Forms: nplurals=2; plural=n != 1;\n" 16 "X-Poedit-Basepath: .\n" 17 "X-Poedit-Language: English\n" 18 "X-Poedit-Country: UNITED STATES\n" 19 "X-Poedit-SourceCharset: utf-8\n" 20 "X-Poedit-KeywordsList: " 21 "__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_" 22 "attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n" 23 "X-Poedit-Bookmarks: \n" 24 "X-Poedit-SearchPath-0: .\n" 25 "X-Textdomain-Support: yes\n" 26 27 #: genesis-simple-hooks.php:87 28 msgid "upgrade to" 29 msgstr "" 30 31 #: genesis-simple-hooks.php:87 32 msgid "install and activate" 33 msgstr "" 34 35 #: genesis-simple-hooks.php:89 36 msgid "" 37 "Genesis Simple Hooks requires WordPress %s and Genesis %s, or greater. " 38 "Please %s the latest version of <a href=\"%s\" " 39 "target=\"_blank\">Genesis</a> to use this plugin." 40 msgstr "" 41 42 #: includes/class-genesis-simple-hooks-admin.php:82 12 "POT-Creation-Date: 2019-08-02T15:09:40+00:00\n" 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.2.0\n" 15 "X-Domain: genesis-simple-hooks\n" 16 17 #. Plugin Name of the plugin 18 msgid "Genesis Simple Hooks" 19 msgstr "" 20 21 #. Plugin URI of the plugin 22 msgid "http://www.studiopress.com/plugins/simple-hooks" 23 msgstr "" 24 25 #. Description of the plugin 26 msgid "Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme." 27 msgstr "" 28 29 #. Author of the plugin 30 msgid "StudioPress" 31 msgstr "" 32 33 #. Author URI of the plugin 34 msgid "http://www.studiopress.com/" 35 msgstr "" 36 37 #: includes/class-genesis-simple-hooks-admin.php:161 43 38 msgid "Genesis - Simple Hooks" 44 39 msgstr "" 45 40 46 #: includes/class-genesis-simple-hooks-admin.php: 8341 #: includes/class-genesis-simple-hooks-admin.php:162 47 42 msgid "Simple Hooks" 48 43 msgstr "" 49 44 50 #: includes/class-genesis-simple-hooks-admin.php: 15045 #: includes/class-genesis-simple-hooks-admin.php:230 51 46 msgid "Executes immediately before the closing <code></head></code> tag." 52 47 msgstr "" 53 48 54 #: includes/class-genesis-simple-hooks-admin.php: 15455 #: includes/class-genesis-simple-hooks-admin.php: 17649 #: includes/class-genesis-simple-hooks-admin.php:234 50 #: includes/class-genesis-simple-hooks-admin.php:256 56 51 msgid "Executes immediately before the closing <code></body></code> tag." 57 52 msgstr "" 58 53 59 #: includes/class-genesis-simple-hooks-admin.php: 16154 #: includes/class-genesis-simple-hooks-admin.php:241 60 55 msgid "Executes in the document head. Genesis uses this to output the doctype." 61 56 msgstr "" 62 57 63 #: includes/class-genesis-simple-hooks-admin.php:165 64 msgid "" 65 "Executes in the document head. Genesis uses this to output the document " 66 "title." 67 msgstr "" 68 69 #: includes/class-genesis-simple-hooks-admin.php:169 58 #: includes/class-genesis-simple-hooks-admin.php:245 59 msgid "Executes in the document head. Genesis uses this to output the document title." 60 msgstr "" 61 62 #: includes/class-genesis-simple-hooks-admin.php:249 70 63 msgid "Executes in the document head. Genesis uses this to output meta tags." 71 64 msgstr "" 72 65 73 #: includes/class-genesis-simple-hooks-admin.php: 17366 #: includes/class-genesis-simple-hooks-admin.php:253 74 67 msgid "Executes immediately after the opening <code><body></code> tag." 75 68 msgstr "" 76 69 77 #: includes/class-genesis-simple-hooks-admin.php: 18270 #: includes/class-genesis-simple-hooks-admin.php:262 78 71 msgid "Executes immediately before the header." 79 72 msgstr "" 80 73 81 #: includes/class-genesis-simple-hooks-admin.php: 18574 #: includes/class-genesis-simple-hooks-admin.php:265 82 75 msgid "Genesis uses this hook to output the default header." 83 76 msgstr "" 84 77 85 #: includes/class-genesis-simple-hooks-admin.php: 18978 #: includes/class-genesis-simple-hooks-admin.php:269 86 79 msgid "Executes inside the page header, immediately before the header widget area." 87 80 msgstr "" 88 81 89 #: includes/class-genesis-simple-hooks-admin.php: 19282 #: includes/class-genesis-simple-hooks-admin.php:272 90 83 msgid "Executes immediately after the header." 91 84 msgstr "" 92 85 93 #: includes/class-genesis-simple-hooks-admin.php: 19586 #: includes/class-genesis-simple-hooks-admin.php:275 94 87 msgid "Executes inside the header. Genesis uses this hook to output the site title." 95 88 msgstr "" 96 89 97 #: includes/class-genesis-simple-hooks-admin.php:199 98 msgid "" 99 "Executes inside the header. Genesis uses this hook to output the site " 100 "description." 101 msgstr "" 102 103 #: includes/class-genesis-simple-hooks-admin.php:206 90 #: includes/class-genesis-simple-hooks-admin.php:279 91 msgid "Executes inside the header. Genesis uses this hook to output the site description." 92 msgstr "" 93 94 #: includes/class-genesis-simple-hooks-admin.php:286 104 95 msgid "Executes before the content-sidebar-wrap opening markup." 105 96 msgstr "" 106 97 107 #: includes/class-genesis-simple-hooks-admin.php:2 0998 #: includes/class-genesis-simple-hooks-admin.php:289 108 99 msgid "Executes after the content-sidebar-wrap closing markup." 109 100 msgstr "" 110 101 111 #: includes/class-genesis-simple-hooks-admin.php:2 12102 #: includes/class-genesis-simple-hooks-admin.php:292 112 103 msgid "Executes before the content opening markup." 113 104 msgstr "" 114 105 115 #: includes/class-genesis-simple-hooks-admin.php:2 15106 #: includes/class-genesis-simple-hooks-admin.php:295 116 107 msgid "Executes after the content closing markup." 117 108 msgstr "" 118 109 119 #: includes/class-genesis-simple-hooks-admin.php: 221110 #: includes/class-genesis-simple-hooks-admin.php:301 120 111 msgid "Executes before the loop." 121 112 msgstr "" 122 113 123 #: includes/class-genesis-simple-hooks-admin.php: 224114 #: includes/class-genesis-simple-hooks-admin.php:304 124 115 msgid "Executes in the content section. Genesis uses this hook to output the loop." 125 116 msgstr "" 126 117 127 #: includes/class-genesis-simple-hooks-admin.php: 228118 #: includes/class-genesis-simple-hooks-admin.php:308 128 119 msgid "Executes after the loop." 129 120 msgstr "" 130 121 131 #: includes/class-genesis-simple-hooks-admin.php: 231122 #: includes/class-genesis-simple-hooks-admin.php:311 132 123 msgid "Executes after the WordPress loop endwhile." 133 124 msgstr "" 134 125 135 #: includes/class-genesis-simple-hooks-admin.php: 235126 #: includes/class-genesis-simple-hooks-admin.php:315 136 127 msgid "Executes in the loop's else statement." 137 128 msgstr "" 138 129 139 #: includes/class-genesis-simple-hooks-admin.php: 239130 #: includes/class-genesis-simple-hooks-admin.php:319 140 131 msgid "Executes if the loop actions are reset." 141 132 msgstr "" 142 133 143 #: includes/class-genesis-simple-hooks-admin.php: 248134 #: includes/class-genesis-simple-hooks-admin.php:328 144 135 msgid "Executes before the entry." 145 136 msgstr "" 146 137 147 #: includes/class-genesis-simple-hooks-admin.php:251 148 msgid "" 149 "Executes as part of the entry. Genesis uses this hook to output the entry " 150 "header." 151 msgstr "" 152 153 #: includes/class-genesis-simple-hooks-admin.php:255 138 #: includes/class-genesis-simple-hooks-admin.php:331 139 msgid "Executes as part of the entry. Genesis uses this hook to output the entry header." 140 msgstr "" 141 142 #: includes/class-genesis-simple-hooks-admin.php:335 154 143 msgid "Executes before the entry content" 155 144 msgstr "" 156 145 157 #: includes/class-genesis-simple-hooks-admin.php:259 158 msgid "" 159 "Executes as part of the entry. Genesis uses this hook to output the entry " 160 "content." 161 msgstr "" 162 163 #: includes/class-genesis-simple-hooks-admin.php:263 146 #: includes/class-genesis-simple-hooks-admin.php:339 147 msgid "Executes as part of the entry. Genesis uses this hook to output the entry content." 148 msgstr "" 149 150 #: includes/class-genesis-simple-hooks-admin.php:343 164 151 msgid "Executes after the entry content" 165 152 msgstr "" 166 153 167 #: includes/class-genesis-simple-hooks-admin.php:267 168 msgid "" 169 "Executes as part of the entry. Genesis uses this hook to output the entry " 170 "footer." 171 msgstr "" 172 173 #: includes/class-genesis-simple-hooks-admin.php:271 154 #: includes/class-genesis-simple-hooks-admin.php:347 155 msgid "Executes as part of the entry. Genesis uses this hook to output the entry footer." 156 msgstr "" 157 158 #: includes/class-genesis-simple-hooks-admin.php:351 174 159 msgid "Executes after the entry." 175 160 msgstr "" 176 161 177 #: includes/class-genesis-simple-hooks-admin.php: 281162 #: includes/class-genesis-simple-hooks-admin.php:361 178 163 msgid "Executes before the post opening markup." 179 164 msgstr "" 180 165 181 #: includes/class-genesis-simple-hooks-admin.php: 284166 #: includes/class-genesis-simple-hooks-admin.php:364 182 167 msgid "Executes after the post closing markup." 183 168 msgstr "" 184 169 185 #: includes/class-genesis-simple-hooks-admin.php: 288170 #: includes/class-genesis-simple-hooks-admin.php:368 186 171 msgid "Executes before the post title." 187 172 msgstr "" 188 173 189 #: includes/class-genesis-simple-hooks-admin.php:292 190 msgid "" 191 "Executes as part of the post. Genesis uses this hook to output the post " 192 "title." 193 msgstr "" 194 195 #: includes/class-genesis-simple-hooks-admin.php:296 174 #: includes/class-genesis-simple-hooks-admin.php:372 175 msgid "Executes as part of the post. Genesis uses this hook to output the post title." 176 msgstr "" 177 178 #: includes/class-genesis-simple-hooks-admin.php:376 196 179 msgid "Executes after the post title." 197 180 msgstr "" 198 181 199 #: includes/class-genesis-simple-hooks-admin.php: 299182 #: includes/class-genesis-simple-hooks-admin.php:379 200 183 msgid "Executes before the post content." 201 184 msgstr "" 202 185 203 #: includes/class-genesis-simple-hooks-admin.php:303 204 msgid "" 205 "Executes as part of the post. Genesis uses this hook to output the post " 206 "content." 207 msgstr "" 208 209 #: includes/class-genesis-simple-hooks-admin.php:307 186 #: includes/class-genesis-simple-hooks-admin.php:383 187 msgid "Executes as part of the post. Genesis uses this hook to output the post content." 188 msgstr "" 189 190 #: includes/class-genesis-simple-hooks-admin.php:387 210 191 msgid "Executes after the post content." 211 192 msgstr "" 212 193 213 #: includes/class-genesis-simple-hooks-admin.php:3 14194 #: includes/class-genesis-simple-hooks-admin.php:394 214 195 msgid "Executes before the comments section opening markup." 215 196 msgstr "" 216 197 217 #: includes/class-genesis-simple-hooks-admin.php:317 218 msgid "" 219 "Executes after an entry. Genesis uses this hook to output the comments " 220 "section." 221 msgstr "" 222 223 #: includes/class-genesis-simple-hooks-admin.php:321 224 msgid "" 225 "Executes in the comments section. Genesis uses this hook to output the " 226 "comment list." 227 msgstr "" 228 229 #: includes/class-genesis-simple-hooks-admin.php:325 198 #: includes/class-genesis-simple-hooks-admin.php:397 199 msgid "Executes after an entry. Genesis uses this hook to output the comments section." 200 msgstr "" 201 202 #: includes/class-genesis-simple-hooks-admin.php:401 203 msgid "Executes in the comments section. Genesis uses this hook to output the comment list." 204 msgstr "" 205 206 #: includes/class-genesis-simple-hooks-admin.php:405 230 207 msgid "Executes after the comments section closing markup." 231 208 msgstr "" 232 209 233 #: includes/class-genesis-simple-hooks-admin.php: 328210 #: includes/class-genesis-simple-hooks-admin.php:408 234 211 msgid "Executes before the pings section opening markup." 235 212 msgstr "" 236 213 237 #: includes/class-genesis-simple-hooks-admin.php: 331214 #: includes/class-genesis-simple-hooks-admin.php:411 238 215 msgid "Executes after an entry. Genesis uses this hook to output the pings section." 239 216 msgstr "" 240 217 241 #: includes/class-genesis-simple-hooks-admin.php:335 242 msgid "" 243 "Executes in the pings section. Genesis uses this hook to output the ping " 244 "list." 245 msgstr "" 246 247 #: includes/class-genesis-simple-hooks-admin.php:339 218 #: includes/class-genesis-simple-hooks-admin.php:415 219 msgid "Executes in the pings section. Genesis uses this hook to output the ping list." 220 msgstr "" 221 222 #: includes/class-genesis-simple-hooks-admin.php:419 248 223 msgid "Executes after the ping section closing markup." 249 224 msgstr "" 250 225 251 #: includes/class-genesis-simple-hooks-admin.php: 342226 #: includes/class-genesis-simple-hooks-admin.php:422 252 227 msgid "Executes before a single comment." 253 228 msgstr "" 254 229 255 #: includes/class-genesis-simple-hooks-admin.php:345 256 msgid "" 257 "Executes in the comment list. Genesis uses this hook to output a single " 258 "comment." 259 msgstr "" 260 261 #: includes/class-genesis-simple-hooks-admin.php:348 230 #: includes/class-genesis-simple-hooks-admin.php:425 231 msgid "Executes in the comment list. Genesis uses this hook to output a single comment." 232 msgstr "" 233 234 #: includes/class-genesis-simple-hooks-admin.php:428 262 235 msgid "Executes after a single comment." 263 236 msgstr "" 264 237 265 #: includes/class-genesis-simple-hooks-admin.php: 351238 #: includes/class-genesis-simple-hooks-admin.php:431 266 239 msgid "Executes before the comment form." 267 240 msgstr "" 268 241 269 #: includes/class-genesis-simple-hooks-admin.php:354 270 msgid "" 271 "Executes after the comment and ping list. Genesis uses this hook to output " 272 "the comment form." 273 msgstr "" 274 275 #: includes/class-genesis-simple-hooks-admin.php:358 242 #: includes/class-genesis-simple-hooks-admin.php:434 243 msgid "Executes after the comment and ping list. Genesis uses this hook to output the comment form." 244 msgstr "" 245 246 #: includes/class-genesis-simple-hooks-admin.php:438 276 247 msgid "Executes after the comment form." 277 248 msgstr "" 278 249 279 #: includes/class-genesis-simple-hooks-admin.php: 364250 #: includes/class-genesis-simple-hooks-admin.php:444 280 251 msgid "Executes before the primary sidebar." 281 252 msgstr "" 282 253 283 #: includes/class-genesis-simple-hooks-admin.php:367 284 msgid "" 285 "Executes after the content section in 2+ column layouts. Genesis uses this " 286 "hook to output the primary sidebar." 287 msgstr "" 288 289 #: includes/class-genesis-simple-hooks-admin.php:371 254 #: includes/class-genesis-simple-hooks-admin.php:447 255 msgid "Executes after the content section in 2+ column layouts. Genesis uses this hook to output the primary sidebar." 256 msgstr "" 257 258 #: includes/class-genesis-simple-hooks-admin.php:451 290 259 msgid "Executes after the primary sidebar." 291 260 msgstr "" 292 261 293 #: includes/class-genesis-simple-hooks-admin.php: 374262 #: includes/class-genesis-simple-hooks-admin.php:454 294 263 msgid "Executes before the primary sidebar widget area." 295 264 msgstr "" 296 265 297 #: includes/class-genesis-simple-hooks-admin.php: 377266 #: includes/class-genesis-simple-hooks-admin.php:457 298 267 msgid "Executes after the primary sidebar widget area." 299 268 msgstr "" 300 269 301 #: includes/class-genesis-simple-hooks-admin.php: 380270 #: includes/class-genesis-simple-hooks-admin.php:460 302 271 msgid "Executes before the secondary sidebar." 303 272 msgstr "" 304 273 305 #: includes/class-genesis-simple-hooks-admin.php:383 306 msgid "" 307 "Executes after the primary sidebar in 3+ column layouts. Genesis uses this " 308 "hook to output the secondary sidebar." 309 msgstr "" 310 311 #: includes/class-genesis-simple-hooks-admin.php:387 274 #: includes/class-genesis-simple-hooks-admin.php:463 275 msgid "Executes after the primary sidebar in 3+ column layouts. Genesis uses this hook to output the secondary sidebar." 276 msgstr "" 277 278 #: includes/class-genesis-simple-hooks-admin.php:467 312 279 msgid "Executes after the secondary sidebar." 313 280 msgstr "" 314 281 315 #: includes/class-genesis-simple-hooks-admin.php: 390282 #: includes/class-genesis-simple-hooks-admin.php:470 316 283 msgid "Executes before the secondary sidebar widget area." 317 284 msgstr "" 318 285 319 #: includes/class-genesis-simple-hooks-admin.php: 393286 #: includes/class-genesis-simple-hooks-admin.php:473 320 287 msgid "Executes after the secondary sidebar widget area." 321 288 msgstr "" 322 289 323 #: includes/class-genesis-simple-hooks-admin.php: 399290 #: includes/class-genesis-simple-hooks-admin.php:479 324 291 msgid "Executes before the site footer." 325 292 msgstr "" 326 293 327 #: includes/class-genesis-simple-hooks-admin.php:402 328 msgid "" 329 "Executes after the content and sidebars. Genesis uses this hook to output " 330 "the site footer." 331 msgstr "" 332 333 #: includes/class-genesis-simple-hooks-admin.php:406 294 #: includes/class-genesis-simple-hooks-admin.php:482 295 msgid "Executes after the content and sidebars. Genesis uses this hook to output the site footer." 296 msgstr "" 297 298 #: includes/class-genesis-simple-hooks-admin.php:486 334 299 msgid "Executes after the site footer." 335 300 msgstr "" 336 301 337 #: includes/class-genesis-simple-hooks-admin.php:4 12302 #: includes/class-genesis-simple-hooks-admin.php:492 338 303 msgid "Executes after the form on the the import/export screen." 339 304 msgstr "" 340 305 341 #: includes/class-genesis-simple-hooks-admin.php:4 15306 #: includes/class-genesis-simple-hooks-admin.php:495 342 307 msgid "Executes during the export function." 343 308 msgstr "" 344 309 345 #: includes/class-genesis-simple-hooks-admin.php:4 18310 #: includes/class-genesis-simple-hooks-admin.php:498 346 311 msgid "Executes during the import function." 347 312 msgstr "" 348 313 349 #: includes/class-genesis-simple-hooks-admin.php: 421314 #: includes/class-genesis-simple-hooks-admin.php:501 350 315 msgid "Executes in the function that adds metaboxes to the theme settings screen." 351 316 msgstr "" 352 317 353 #: includes/class-genesis-simple-hooks-admin.php: 424318 #: includes/class-genesis-simple-hooks-admin.php:504 354 319 msgid "Executes after Genesis upgrades itself." 355 320 msgstr "" 356 321 357 #: includes/class-genesis-simple-hooks-admin.php: 485322 #: includes/class-genesis-simple-hooks-admin.php:574 358 323 msgid "Hook" 359 324 msgstr "" 360 325 361 #: includes/class-genesis-simple-hooks-admin.php:497 326 #. Translators: The string is the name of a function. 327 #: includes/class-genesis-simple-hooks-admin.php:592 362 328 msgid "Unhook <code>%s()</code> function from this hook?" 363 329 msgstr "" 364 330 365 #: includes/class-genesis-simple-hooks-admin.php: 515331 #: includes/class-genesis-simple-hooks-admin.php:609 366 332 msgid "Execute Shortcodes on this hook?" 367 333 msgstr "" 368 334 369 #: includes/class-genesis-simple-hooks-admin.php: 523335 #: includes/class-genesis-simple-hooks-admin.php:617 370 336 msgid "Execute PHP on this hook?" 371 337 msgstr "" 372 338 373 #: includes/class-genesis-simple-hooks-admin.php: 543339 #: includes/class-genesis-simple-hooks-admin.php:636 374 340 msgid "WordPress Hooks" 375 341 msgstr "" 376 342 377 #: includes/class-genesis-simple-hooks-admin.php: 544343 #: includes/class-genesis-simple-hooks-admin.php:637 378 344 msgid "Document Hooks" 379 345 msgstr "" 380 346 381 #: includes/class-genesis-simple-hooks-admin.php: 545347 #: includes/class-genesis-simple-hooks-admin.php:638 382 348 msgid "Header Hooks" 383 349 msgstr "" 384 350 385 #: includes/class-genesis-simple-hooks-admin.php: 546351 #: includes/class-genesis-simple-hooks-admin.php:639 386 352 msgid "Content Hooks" 387 353 msgstr "" 388 354 389 #: includes/class-genesis-simple-hooks-admin.php: 547355 #: includes/class-genesis-simple-hooks-admin.php:640 390 356 msgid "Loop Hooks" 391 357 msgstr "" 392 358 393 #: includes/class-genesis-simple-hooks-admin.php: 550359 #: includes/class-genesis-simple-hooks-admin.php:643 394 360 msgid "Entry Hooks" 395 361 msgstr "" 396 362 397 #: includes/class-genesis-simple-hooks-admin.php: 552363 #: includes/class-genesis-simple-hooks-admin.php:645 398 364 msgid "Post/Page Hooks" 399 365 msgstr "" 400 366 401 #: includes/class-genesis-simple-hooks-admin.php: 554367 #: includes/class-genesis-simple-hooks-admin.php:648 402 368 msgid "Comment Hooks" 403 369 msgstr "" 404 370 405 #: includes/class-genesis-simple-hooks-admin.php: 555371 #: includes/class-genesis-simple-hooks-admin.php:649 406 372 msgid "Sidebar Hooks" 407 373 msgstr "" 408 374 409 #: includes/class-genesis-simple-hooks-admin.php: 556375 #: includes/class-genesis-simple-hooks-admin.php:650 410 376 msgid "Footer Hooks" 411 377 msgstr "" 412 378 413 #: includes/class-genesis-simple-hooks-admin.php: 564414 #: includes/class-genesis-simple-hooks-admin.php: 572415 #: includes/class-genesis-simple-hooks-admin.php: 580416 #: includes/class-genesis-simple-hooks-admin.php: 588417 #: includes/class-genesis-simple-hooks-admin.php: 596418 #: includes/class-genesis-simple-hooks-admin.php: 604419 #: includes/class-genesis-simple-hooks-admin.php: 612420 #: includes/class-genesis-simple-hooks-admin.php: 620421 #: includes/class-genesis-simple-hooks-admin.php: 628422 #: includes/class-genesis-simple-hooks-admin.php: 636423 #: includes/class-genesis-simple-hooks-admin.php: 644379 #: includes/class-genesis-simple-hooks-admin.php:661 380 #: includes/class-genesis-simple-hooks-admin.php:672 381 #: includes/class-genesis-simple-hooks-admin.php:683 382 #: includes/class-genesis-simple-hooks-admin.php:694 383 #: includes/class-genesis-simple-hooks-admin.php:705 384 #: includes/class-genesis-simple-hooks-admin.php:716 385 #: includes/class-genesis-simple-hooks-admin.php:727 386 #: includes/class-genesis-simple-hooks-admin.php:738 387 #: includes/class-genesis-simple-hooks-admin.php:749 388 #: includes/class-genesis-simple-hooks-admin.php:760 389 #: includes/class-genesis-simple-hooks-admin.php:771 424 390 msgid "Save Changes" 425 391 msgstr "" -
genesis-simple-hooks/trunk/package.json
r1831101 r2134959 7 7 }, 8 8 "dependencies": {}, 9 "devDependencies": { 10 "grunt": "*", 11 "grunt-autoprefixer": "*", 12 "grunt-checktextdomain": "*", 13 "grunt-contrib-cssmin": "*", 14 "grunt-contrib-imagemin": "*", 15 "grunt-contrib-jshint": "*", 16 "grunt-contrib-uglify": "*", 17 "grunt-contrib-watch": "*", 18 "grunt-csscomb": "*", 19 "grunt-jsbeautifier": "*", 20 "grunt-jsvalidate": "*", 21 "grunt-phplint": "*", 22 "grunt-styledocco": "*", 23 "grunt-wp-i18n": "*", 24 "load-grunt-tasks": "*" 9 "scripts": { 10 "makepot": "composer makepot" 25 11 }, 26 12 "plugin": { … … 30 16 "author": "StudioPress", 31 17 "authoruri": "http://www.studiopress.com/", 32 "version": "2. 2.1",18 "version": "2.3.0", 33 19 "license": "GPL-2.0+", 34 20 "licenseuri": "http://www.gnu.org/licenses/gpl-2.0.html", -
genesis-simple-hooks/trunk/plugin.php
r1831101 r2134959 1 <?php 2 /* 3 Plugin Name: Genesis Simple Hooks 4 Plugin URI: http://www.studiopress.com/plugins/simple-hooks 1 <?php //phpcs:ignore 2 /** 3 * Plugin Name: Genesis Simple Hooks 4 * Plugin URI: http://www.studiopress.com/plugins/simple-hooks 5 * 6 * Description: Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme. 7 * 8 * Author: StudioPress 9 * Author URI: http://www.studiopress.com/ 10 * 11 * Version: 2.3.0 12 * 13 * Text Domain: genesis-simple-hooks 14 * Domain Path: /languages 15 * 16 * License: GNU General Public License v2.0 (or later) 17 * License URI: http://www.opensource.org/licenses/gpl-license.php 18 */ 5 19 6 Description: Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme. 7 8 Author: StudioPress 9 Author URI: http://www.studiopress.com/ 10 11 Version: 2.2.1 12 13 Text Domain: genesis-simple-hooks 14 Domain Path: /languages 15 16 License: GNU General Public License v2.0 (or later) 17 License URI: http://www.opensource.org/licenses/gpl-license.php 18 */ 19 20 require_once( plugin_dir_path( __FILE__ ) . 'genesis-simple-hooks.php' ); 20 require_once plugin_dir_path( __FILE__ ) . 'genesis-simple-hooks.php'; -
genesis-simple-hooks/trunk/readme.txt
r1831159 r2134959 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5553118 4 4 Tags: hooks, genesis, genesiswp, studiopress 5 Requires at least: 4. 9.06 Tested up to: 4.9.47 Stable tag: 2. 2.15 Requires at least: 4.7.2 6 Tested up to: 5.2.2 7 Stable tag: 2.3.0 8 8 9 9 This plugin creates a new Genesis settings page that allows you to insert code (HTML, Shortcodes, and PHP), and attach it to any of the 50+ action hooks throughout the Genesis Theme Framework, from StudioPress. … … 48 48 ` 49 49 <div class="post-info"> 50 <span class="time"><?php the_time('F j, Y'); ?></span> <span class="author">by <?php the_author_posts_link(); ?></span> <span class="post-comments"><a href="<?php the_permalink(); ?>#respond"><?php comments_number('Leave a Comment', '1 Comment', '% Comments'); ?></a></span> <a class="post-edit-link"><?php edit_post_link('(Edit)', '', ''); ?></a> 50 <span class="time"><?php the_time('F j, Y'); ?></span> <span class="author">by <?php the_author_posts_link(); ?></span> <span class="post-comments"><a href="<?php the_permalink(); ?>#respond"><?php comments_number('Leave a Comment', '1 Comment', '% Comments'); ?></a></span> <a class="post-edit-link"><?php edit_post_link('(Edit)', '', ''); ?></a> 51 51 </div> 52 52 ` … … 55 55 ` 56 56 <div class="post-meta"> 57 <span class="categories">Filed under: <?php the_category(', ') ?></span> <span class="tags">Tagged with <?php the_tags('') ?></span> 57 <span class="categories">Filed under: <?php the_category(', ') ?></span> <span class="tags">Tagged with <?php the_tags('') ?></span> 58 58 </div> 59 59 ` … … 72 72 73 73 == Changelog == 74 75 = 2.3.0 = 76 * Reorganize plugin based on our standard boilerplate. 77 * Update to match WordPress PHP standards. 78 * Fix bug where plugin name was empty in the minimum version warning. 79 * Increase minimum Genesis version to 2.5.0. 74 80 75 81 = 2.2.1 = … … 150 156 = 0.1 = 151 157 * Initial Release 152 153 154 155 156 157 158 159
Note: See TracChangeset
for help on using the changeset viewer.