Plugin Directory

Changeset 2134959


Ignore:
Timestamp:
08/06/2019 12:37:27 PM (7 years ago)
Author:
nathanrice
Message:

Tagging 2.3.0

Location:
genesis-simple-hooks
Files:
12 added
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • genesis-simple-hooks/tags/2.3.0/genesis-simple-hooks.php

    r1831101 r2134959  
    11<?php
     2/**
     3 * This file handles the creation of the Simple Hooks admin menu.
     4 *
     5 * @package genesis-simple-hooks
     6 */
    27
    3 class Genesis_Simple_Hooks {
     8define( 'GENESIS_SIMPLE_HOOKS_DIR', plugin_dir_path( __FILE__ ) );
     9define( 'GENESIS_SIMPLE_HOOKS_URL', plugins_url( '', __FILE__ ) );
     10define( 'GENESIS_SIMPLE_HOOKS_VERSION', '2.3.0' );
    411
    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 }
     12require_once GENESIS_SIMPLE_HOOKS_DIR . '/includes/class-genesis-simple-hooks.php';
    19413
    19514/**
     
    19817 * @since 0.9.0
    19918 */
    200 function Genesis_Simple_Hooks() {
     19function genesis_simple_hooks() {
    20120
    20221    static $object;
    20322
    204     if ( null == $object ) {
    205         $object = new Genesis_Simple_Hooks;
     23    if ( null === $object ) {
     24        $object = new Genesis_Simple_Hooks();
    20625    }
    20726
     
    20928}
    21029/**
    211  * Initialize the object on `plugins_loaded`.
     30 * Initialize the object on `plugins_loaded`.
    21231 */
    21332add_action( 'plugins_loaded', array( Genesis_Simple_Hooks(), 'init' ) );
  • genesis-simple-hooks/tags/2.3.0/includes/class-genesis-simple-hooks-admin.php

    r1831101 r2134959  
    22/**
    33 * This file handles the creation of the Simple Hooks admin menu.
     4 *
     5 * @package genesis-simple-hooks
    46 */
    5 
    67
    78/**
     
    1718     *
    1819     * @since 2.2.0
     20     *
     21     * @var $settings_field Settings Field
    1922     */
    2023    public $settings_field = 'simplehooks-settings';
    2124
     25    /**
     26     * WP Hooks.
     27     *
     28     * @since 2.2.0
     29     *
     30     * @var $wp_hooks WP Hooks
     31     */
    2232    public $wp_hooks;
    2333
     34    /**
     35     * Document Hooks.
     36     *
     37     * @since 2.2.0
     38     *
     39     * @var $document_hooks Document Hooks
     40     */
    2441    public $document_hooks;
    2542
     43    /**
     44     * Header Hooks.
     45     *
     46     * @since 2.2.0
     47     *
     48     * @var $header_hooks Header Hooks
     49     */
    2650    public $header_hooks;
    2751
     52    /**
     53     * Content Hooks.
     54     *
     55     * @since 2.2.0
     56     *
     57     * @var $content_hooks Content Hooks
     58     */
    2859    public $content_hooks;
    2960
     61    /**
     62     * Loop Hooks.
     63     *
     64     * @since 2.2.0
     65     *
     66     * @var $loop_hooks Loop Hooks
     67     */
    3068    public $loop_hooks;
    3169
     70    /**
     71     * Entry Hooks.
     72     *
     73     * @since 2.2.0
     74     *
     75     * @var $settings_field Entry Hooks
     76     */
    3277    public $entry_hooks;
    3378
     79    /**
     80     * Post Hooks.
     81     *
     82     * @since 2.2.0
     83     *
     84     * @var $settings_field Post Hooks
     85     */
    3486    public $post_hooks;
    3587
     88    /**
     89     * Comment Hooks.
     90     *
     91     * @since 2.2.0
     92     *
     93     * @var $comment_hooks Comment Hooks
     94     */
    3695    public $comment_hooks;
    3796
     97    /**
     98     * Sidebar Hooks.
     99     *
     100     * @since 2.2.0
     101     *
     102     * @var $sidebar_hooks Sidebar Hooks
     103     */
    38104    public $sidebar_hooks;
    39105
     106    /**
     107     * Footer Hooks.
     108     *
     109     * @since 2.2.0
     110     *
     111     * @var $footer_hooks Footer Hooks
     112     */
    40113    public $footer_hooks;
    41114
     115    /**
     116     * Admin Hooks.
     117     *
     118     * @since 2.2.0
     119     *
     120     * @var $admin_hooks Admin Hooks
     121     */
    42122    public $admin_hooks;
    43123
     
    46126     *
    47127     * @since 1.8.0
    48      *
    49128     */
    50129    public function __construct() {
    51130
    52         // For backward compatibility
     131        // For backward compatibility.
    53132        define( 'SIMPLEHOOKS_SETTINGS_FIELD', $this->settings_field );
    54133
     
    81160                'parent_slug' => 'genesis',
    82161                '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            ),
    85164        );
    86165
     
    89168        );
    90169
    91         // Create the page
     170        // Create the page.
    92171        $this->create( $page_id, $menu_ops, $page_ops, $this->settings_field, $this->get_default_settings() );
    93172
     
    98177     *
    99178     * @since 1.8.0
    100      *
    101179     */
    102180    public function scripts() {
    103181
    104         // Load parent scripts as well as Genesis admin scripts */
     182        // Load parent scripts as well as Genesis admin scripts.
    105183        parent::scripts();
    106184        genesis_scripts()->enqueue_and_localize_admin_scripts();
     
    112190     *
    113191     * @since 2.2.0
     192     *
     193     * @param Array $newvalue New value.
     194     * @param Array $oldvalue Old value.
    114195     */
    115196    public function save( $newvalue, $oldvalue ) {
     
    132213
    133214            }
    134 
    135215        }
    136216
     
    147227
    148228        $this->wp_hooks = array(
    149             'wp_head' => array(
     229            'wp_head'   => array(
    150230                'description' => __( 'Executes immediately before the closing <code>&lt;/head&gt;</code> tag.', 'genesis-simple-hooks' ),
    151231                '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' ),
     
    162242                'unhook'      => array( 'genesis_do_doctype' ),
    163243            ),
    164             'genesis_title' => array(
     244            'genesis_title'   => array(
    165245                'description' => __( 'Executes in the document head. Genesis uses this to output the document title.', 'genesis-simple-hooks' ),
    166246                'unhook'      => array( 'genesis_do_title' ),
    167247            ),
    168             'genesis_meta' => array(
     248            'genesis_meta'    => array(
    169249                '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(
    173253                'description' => __( 'Executes immediately after the opening <code>&lt;body&gt;</code> tag.', 'genesis-simple-hooks' ),
    174254            ),
    175             'genesis_after' => array(
     255            'genesis_after'   => array(
    176256                'description' => __( 'Executes immediately before the closing <code>&lt;/body&gt;</code> tag.', 'genesis-simple-hooks' ),
    177257            ),
     
    179259
    180260        $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(
    185265                'description' => __( 'Genesis uses this hook to output the default header.', 'genesis-simple-hooks' ),
    186266                'unhook'      => array( 'genesis_do_header' ),
    187267            ),
    188             'genesis_header_right' => array(
     268            'genesis_header_right'     => array(
    189269                'description' => __( 'Executes inside the page header, immediately before the header widget area.', 'genesis-simple-hooks' ),
    190270            ),
    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' ),
    196276                'unhook'      => array( 'genesis_seo_site_title' ),
    197277            ),
    198278            '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' ),
    200280                'unhook'      => array( 'genesis_seo_site_description' ),
    201281            ),
     
    206286                'description' => __( 'Executes before the content-sidebar-wrap opening markup.', 'genesis-simple-hooks' ),
    207287            ),
    208             'genesis_after_content_sidebar_wrap' => array(
     288            'genesis_after_content_sidebar_wrap'  => array(
    209289                'description' => __( 'Executes after the content-sidebar-wrap closing markup.', 'genesis-simple-hooks' ),
    210290            ),
    211             'genesis_before_content' => array(
     291            'genesis_before_content'              => array(
    212292                'description' => __( 'Executes before the content opening markup.', 'genesis-simple-hooks' ),
    213293            ),
    214             'genesis_after_content' => array(
     294            'genesis_after_content'               => array(
    215295                'description' => __( 'Executes after the content closing markup.', 'genesis-simple-hooks' ),
    216296            ),
     
    218298
    219299        $this->loop_hooks = array(
    220             'genesis_before_loop' => array(
     300            'genesis_before_loop'    => array(
    221301                'description' => __( 'Executes before the loop.', 'genesis-simple-hooks' ),
    222302            ),
    223             'genesis_loop' => array(
     303            'genesis_loop'           => array(
    224304                'description' => __( 'Executes in the content section. Genesis uses this hook to output the loop.', 'genesis-simple-hooks' ),
    225305                'unhook'      => array( 'genesis_do_loop' ),
    226306            ),
    227             'genesis_after_loop' => array(
     307            'genesis_after_loop'     => array(
    228308                'description' => __( 'Executes after the loop.', 'genesis-simple-hooks' ),
    229309            ),
     
    232312                'unhook'      => array( 'genesis_posts_nav' ),
    233313            ),
    234             'genesis_loop_else' => array(
     314            'genesis_loop_else'      => array(
    235315                'description' => __( "Executes in the loop's else statement.", 'genesis-simple-hooks' ),
    236316                'unhook'      => array( 'genesis_do_noposts' ),
    237317            ),
    238             'genesis_reset_loops' => array(
     318            'genesis_reset_loops'    => array(
    239319                'description' => __( 'Executes if the loop actions are reset.', 'genesis-simple-hooks' ),
    240320            ),
     
    245325         */
    246326        $this->entry_hooks = array(
    247             'genesis_before_entry' => array(
     327            'genesis_before_entry'         => array(
    248328                'description' => __( 'Executes before the entry.', 'genesis-simple-hooks' ),
    249329            ),
    250             'genesis_entry_header' => array(
     330            'genesis_entry_header'         => array(
    251331                'description' => __( 'Executes as part of the entry. Genesis uses this hook to output the entry header.', 'genesis-simple-hooks' ),
    252332                'unhook'      => array( 'genesis_do_post_title' ),
     
    256336                'unhook'      => array( 'genesis_do_post_content' ),
    257337            ),
    258             'genesis_entry_content' => array(
     338            'genesis_entry_content'        => array(
    259339                'description' => __( 'Executes as part of the entry. Genesis uses this hook to output the entry content.', 'genesis-simple-hooks' ),
    260340                'unhook'      => array( 'genesis_do_post_content' ),
    261341            ),
    262             'genesis_after_entry_content' => array(
     342            'genesis_after_entry_content'  => array(
    263343                'description' => __( 'Executes after the entry content', 'genesis-simple-hooks' ),
    264344                'unhook'      => array( 'genesis_do_post_content' ),
    265345            ),
    266             'genesis_entry_footer' => array(
     346            'genesis_entry_footer'         => array(
    267347                'description' => __( 'Executes as part of the entry. Genesis uses this hook to output the entry footer.', 'genesis-simple-hooks' ),
    268348                'unhook'      => array( 'genesis_post_meta' ),
    269349            ),
    270             'genesis_after_entry' => array(
     350            'genesis_after_entry'          => array(
    271351                'description' => __( 'Executes after the entry.', 'genesis-simple-hooks' ),
    272352                'unhook'      => array( 'genesis_adjacent_entry_nav', 'genesis_get_comments_template' ),
     
    275355
    276356        /**
    277          * xHTML post hooks
     357         * The xHTML post hooks
    278358         */
    279359        $this->post_hooks = array(
    280             'genesis_before_post' => array(
     360            'genesis_before_post'         => array(
    281361                'description' => __( 'Executes before the post opening markup.', 'genesis-simple-hooks' ),
    282362            ),
    283             'genesis_after_post' => array(
     363            'genesis_after_post'          => array(
    284364                'description' => __( 'Executes after the post closing markup.', 'genesis-simple-hooks' ),
    285365                'unhook'      => array( 'genesis_do_author_box_single', 'genesis_get_comments_template' ),
    286366            ),
    287             'genesis_before_post_title' => array(
     367            'genesis_before_post_title'   => array(
    288368                'description' => __( 'Executes before the post title.', 'genesis-simple-hooks' ),
    289369                'unhook'      => array( 'genesis_do_post_format_image' ),
    290370            ),
    291             'genesis_post_title' => array(
     371            'genesis_post_title'          => array(
    292372                'description' => __( 'Executes as part of the post. Genesis uses this hook to output the post title.', 'genesis-simple-hooks' ),
    293373                'unhook'      => array( 'genesis_do_post_title' ),
    294374            ),
    295             'genesis_after_post_title' => array(
     375            'genesis_after_post_title'    => array(
    296376                'description' => __( 'Executes after the post title.', 'genesis-simple-hooks' ),
    297377            ),
     
    300380                'unhook'      => array( 'genesis_post_info' ),
    301381            ),
    302             'genesis_post_content' => array(
     382            'genesis_post_content'        => array(
    303383                'description' => __( 'Executes as part of the post. Genesis uses this hook to output the post content.', 'genesis-simple-hooks' ),
    304384                'unhook'      => array( 'genesis_do_post_image', 'genesis_do_post_content', 'genesis_do_post_permalink', 'genesis_do_post_content_nav' ),
    305385            ),
    306             'genesis_after_post_content' => array(
     386            'genesis_after_post_content'  => array(
    307387                'description' => __( 'Executes after the post content.', 'genesis-simple-hooks' ),
    308388                'unhook'      => array( 'genesis_post_meta' ),
     
    311391
    312392        $this->comment_hooks = array(
    313             'genesis_before_comments' => array(
     393            'genesis_before_comments'     => array(
    314394                'description' => __( 'Executes before the comments section opening markup.', 'genesis-simple-hooks' ),
    315395            ),
    316             'genesis_comments' => array(
     396            'genesis_comments'            => array(
    317397                'description' => __( 'Executes after an entry. Genesis uses this hook to output the comments section.', 'genesis-simple-hooks' ),
    318398                'unhook'      => array( 'genesis_do_comments' ),
    319399            ),
    320             'genesis_list_comments' => array(
     400            'genesis_list_comments'       => array(
    321401                'description' => __( 'Executes in the comments section. Genesis uses this hook to output the comment list.', 'genesis-simple-hooks' ),
    322402                'unhook'      => array( 'genesis_default_list_comments' ),
    323403            ),
    324             'genesis_after_comments' => array(
     404            'genesis_after_comments'      => array(
    325405                'description' => __( 'Executes after the comments section closing markup.', 'genesis-simple-hooks' ),
    326406            ),
    327             'genesis_before_pings' => array(
     407            'genesis_before_pings'        => array(
    328408                'description' => __( 'Executes before the pings section opening markup.', 'genesis-simple-hooks' ),
    329409            ),
    330             'genesis_pings' => array(
     410            'genesis_pings'               => array(
    331411                'description' => __( 'Executes after an entry. Genesis uses this hook to output the pings section.', 'genesis-simple-hooks' ),
    332412                'unhook'      => array( 'genesis_do_pings' ),
    333413            ),
    334             'genesis_list_pings' => array(
     414            'genesis_list_pings'          => array(
    335415                'description' => __( 'Executes in the pings section. Genesis uses this hook to output the ping list.', 'genesis-simple-hooks' ),
    336416                'unhook'      => array( 'genesis_default_list_pings' ),
    337417            ),
    338             'genesis_after_pings' => array(
     418            'genesis_after_pings'         => array(
    339419                'description' => __( 'Executes after the ping section closing markup.', 'genesis-simple-hooks' ),
    340420            ),
    341             'genesis_before_comment' => array(
     421            'genesis_before_comment'      => array(
    342422                'description' => __( 'Executes before a single comment.', 'genesis-simple-hooks' ),
    343423            ),
    344             'genesis_comment' => array(
     424            'genesis_comment'             => array(
    345425                'description' => __( 'Executes in the comment list. Genesis uses this hook to output a single comment.', 'genesis-simple-hooks' ),
    346426            ),
    347             'genesis_after_comment' => array(
     427            'genesis_after_comment'       => array(
    348428                'description' => __( 'Executes after a single comment.', 'genesis-simple-hooks' ),
    349429            ),
     
    351431                'description' => __( 'Executes before the comment form.', 'genesis-simple-hooks' ),
    352432            ),
    353             'genesis_comment_form' => array(
     433            'genesis_comment_form'        => array(
    354434                'description' => __( 'Executes after the comment and ping list. Genesis uses this hook to output the comment form.', 'genesis-simple-hooks' ),
    355435                'unhook'      => array( 'genesis_do_comment_form' ),
    356436            ),
    357             'genesis_after_comment_form' => array(
     437            'genesis_after_comment_form'  => array(
    358438                'description' => __( 'Executes after the comment form.', 'genesis-simple-hooks' ),
    359439            ),
     
    361441
    362442        $this->sidebar_hooks = array(
    363             'genesis_before_sidebar' => array(
     443            'genesis_before_sidebar'                 => array(
    364444                'description' => __( 'Executes before the primary sidebar.', 'genesis-simple-hooks' ),
    365445            ),
    366             'genesis_sidebar' => array(
     446            'genesis_sidebar'                        => array(
    367447                'description' => __( 'Executes after the content section in 2+ column layouts. Genesis uses this hook to output the primary sidebar.', 'genesis-simple-hooks' ),
    368448                'unhook'      => array( 'genesis_do_sidebar' ),
    369449            ),
    370             'genesis_after_sidebar' => array(
     450            'genesis_after_sidebar'                  => array(
    371451                'description' => __( 'Executes after the primary sidebar.', 'genesis-simple-hooks' ),
    372452            ),
    373             'genesis_before_sidebar_widget_area' => array(
     453            'genesis_before_sidebar_widget_area'     => array(
    374454                'description' => __( 'Executes before the primary sidebar widget area.', 'genesis-simple-hooks' ),
    375455            ),
    376             'genesis_after_sidebar_widget_area' => array(
     456            'genesis_after_sidebar_widget_area'      => array(
    377457                'description' => __( 'Executes after the primary sidebar widget area.', 'genesis-simple-hooks' ),
    378458            ),
    379             'genesis_before_sidebar_alt' => array(
     459            'genesis_before_sidebar_alt'             => array(
    380460                'description' => __( 'Executes before the secondary sidebar.', 'genesis-simple-hooks' ),
    381461            ),
    382             'genesis_sidebar_alt' => array(
     462            'genesis_sidebar_alt'                    => array(
    383463                'description' => __( 'Executes after the primary sidebar in 3+ column layouts. Genesis uses this hook to output the secondary sidebar.', 'genesis-simple-hooks' ),
    384464                'unhook'      => array( 'genesis_do_sidebar_alt' ),
    385465            ),
    386             'genesis_after_sidebar_alt' => array(
     466            'genesis_after_sidebar_alt'              => array(
    387467                'description' => __( 'Executes after the secondary sidebar.', 'genesis-simple-hooks' ),
    388468            ),
     
    390470                'description' => __( 'Executes before the secondary sidebar widget area.', 'genesis-simple-hooks' ),
    391471            ),
    392             'genesis_after_sidebar_alt_widget_area' => array(
     472            'genesis_after_sidebar_alt_widget_area'  => array(
    393473                'description' => __( 'Executes after the secondary sidebar widget area.', 'genesis-simple-hooks' ),
    394474            ),
     
    399479                'description' => __( 'Executes before the site footer.', 'genesis-simple-hooks' ),
    400480            ),
    401             'genesis_footer' => array(
     481            'genesis_footer'        => array(
    402482                'description' => __( 'Executes after the content and sidebars. Genesis uses this hook to output the site footer.', 'genesis-simple-hooks' ),
    403483                'unhook'      => array( 'genesis_do_footer' ),
    404484            ),
    405             'genesis_after_footer' => array(
     485            'genesis_after_footer'  => array(
    406486                'description' => __( 'Executes after the site footer.', 'genesis-simple-hooks' ),
    407487            ),
     
    409489
    410490        $this->admin_hooks = array(
    411             'genesis_import_export_form' => array(
     491            'genesis_import_export_form'       => array(
    412492                'description' => __( 'Executes after the form on the the import/export screen.', 'genesis-simple-hooks' ),
    413493            ),
    414             'genesis_export' => array(
     494            'genesis_export'                   => array(
    415495                'description' => __( 'Executes during the export function.', 'genesis-simple-hooks' ),
    416496            ),
    417             'genesis_import' => array(
     497            'genesis_import'                   => array(
    418498                'description' => __( 'Executes during the import function.', 'genesis-simple-hooks' ),
    419499            ),
     
    421501                'description' => __( 'Executes in the function that adds metaboxes to the theme settings screen.', 'genesis-simple-hooks' ),
    422502            ),
    423             'genesis_upgrade' => array(
     503            'genesis_upgrade'                  => array(
    424504                'description' => __( 'Executes after Genesis upgrades itself.', 'genesis-simple-hooks' ),
    425505                'unhook'      => array( 'genesis_upgrade_redirect' ),
     
    436516    public function get_default_settings() {
    437517
    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        );
    439526
    440527    }
     
    447534    public function get_hooks() {
    448535
    449         // Merge all hooks arrays
     536        // Merge all hooks arrays.
    450537        $hooks = array_merge(
    451538            $this->wp_hooks,
     
    462549        );
    463550
    464         // Just the keys
     551        // Just the keys.
    465552        $hooks = array_keys( $hooks );
    466553
     
    473560     *
    474561     * @since 2.2.0
     562     *
     563     * @param Array $hooks Hooks.
    475564     */
    476565    public function generate_form_markup_from_hooks( $hooks ) {
     
    478567        foreach ( (array) $hooks as $hook => $info ) {
    479568
    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 ) ) {
    482571                continue;
    483572            }
    484573
    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'] ) );
    487576
    488577            if ( isset( $info['unhook'] ) ) {
    489 
     578                $allowed_html = array(
     579                    'a' => array(
     580                        'href'   => array(),
     581                        'target' => array(),
     582                    ),
     583                );
    490584                foreach ( (array) $info['unhook'] as $function ) {
    491585                    printf(
     
    494588                        $this->settings_field . "[{$hook}][unhook][]",
    495589                        $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 ) )
    498593                    );
    499594                }
    500 
    501595            }
    502596
    503597            printf(
    504598                '<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' ) )
    507601            );
    508602
     
    511605            printf(
    512606                '<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]" ),
    514608                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' ) )
    516610            );
    517611
     
    519613                printf(
    520614                    '<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]" ),
    522616                    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' ) )
    524618                );
    525619            }
     
    534628
    535629    /**
    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     */
    541634    public function metaboxes() {
    542635
     
    547640        add_meta_box( 'simplehooks-loop-hooks', __( 'Loop Hooks', 'genesis-simple-hooks' ), array( $this, 'loop_hooks_box' ), $this->pagehook, 'main' );
    548641
    549         if ( current_theme_supports( 'html5' ) )
     642        if ( current_theme_supports( 'html5' ) ) {
    550643            add_meta_box( 'simplehooks-entry-hooks', __( 'Entry Hooks', 'genesis-simple-hooks' ), array( $this, 'html5_entry_hooks_box' ), $this->pagehook, 'main' );
    551         else
     644        } else {
    552645            add_meta_box( 'simplehooks-post-hooks', __( 'Post/Page Hooks', 'genesis-simple-hooks' ), array( $this, 'post_hooks_box' ), $this->pagehook, 'main' );
     646        }
    553647
    554648        add_meta_box( 'simplehooks-comment-hooks', __( 'Comment Hooks', 'genesis-simple-hooks' ), array( $this, 'comment_hooks_box' ), $this->pagehook, 'main' );
     
    558652    }
    559653
     654    /**
     655     * WP Hooks Box
     656     */
    560657    public function wp_hooks_box() {
    561658
     
    566663    }
    567664
     665    /**
     666     * Internal Hooks Box
     667     */
    568668    public function internal_hooks_box() {
    569669
     
    574674    }
    575675
     676    /**
     677     * Document Hooks Box
     678     */
    576679    public function document_hooks_box() {
    577680
     
    582685    }
    583686
     687    /**
     688     * Header Hooks Box
     689     */
    584690    public function header_hooks_box() {
    585691
     
    590696    }
    591697
     698    /**
     699     * Content Hooks Box
     700     */
    592701    public function content_hooks_box() {
    593702
     
    598707    }
    599708
     709    /**
     710     * Loop Hooks Box
     711     */
    600712    public function loop_hooks_box() {
    601713
     
    606718    }
    607719
     720    /**
     721     * HTML5 Entry Hooks Box
     722     */
    608723    public function html5_entry_hooks_box() {
    609724
     
    614729    }
    615730
     731    /**
     732     * Post Hooks Box
     733     */
    616734    public function post_hooks_box() {
    617735
     
    622740    }
    623741
     742    /**
     743     * Comment Hooks Box
     744     */
    624745    public function comment_hooks_box() {
    625746
     
    630751    }
    631752
     753    /**
     754     * Sidebar Hooks Box
     755     */
    632756    public function sidebar_hooks_box() {
    633757
     
    638762    }
    639763
     764    /**
     765     * Footer Hooks Box
     766     */
    640767    public function footer_hooks_box() {
    641768
  • genesis-simple-hooks/tags/2.3.0/includes/deprecated.php

    r1611304 r2134959  
    11<?php
     2/**
     3 * A deprecated instance of simple hooks
     4 *
     5 * @package genesis-simple-hooks
     6 */
    27
    38/**
  • genesis-simple-hooks/tags/2.3.0/includes/functions.php

    r1611304 r2134959  
    11<?php
     2/**
     3 * Additional Functions for Simple Hooks
     4 *
     5 * @package genesis-simple-hooks
     6 */
    27
    38/**
     
    510 *
    611 * @since 0.1
     12 *
     13 * @param Array $hook Hook.
     14 * @param Array $field Field.
     15 * @param Array $all All.
    716 */
    817function simplehooks_get_option( $hook = null, $field = null, $all = false ) {
     
    1625    }
    1726
    18     if ( ! array_key_exists( $hook, (array) $options ) )
     27    if ( ! array_key_exists( $hook, (array) $options ) ) {
    1928        return '';
     29    }
    2030
    21     $option = isset( $options[$hook][$field] ) ? $options[$hook][$field] : '';
     31    $option = isset( $options[ $hook ][ $field ] ) ? $options[ $hook ][ $field ] : '';
    2232
    2333    return wp_kses_stripslashes( wp_kses_decode_entities( $option ) );
     
    2838 *
    2939 * @since 0.1
     40 *
     41 * @param Array $hook Hook.
     42 * @param Array $field Field.
    3043 */
    31 function simplehooks_option($hook = null, $field = null) {
     44function simplehooks_option( $hook = null, $field = null ) {
    3245
     46    // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    3347    echo simplehooks_get_option( $hook, $field );
    3448
  • genesis-simple-hooks/tags/2.3.0/languages/genesis-simple-hooks.pot

    r1611304 r2134959  
    1 # Copyright (C) 2017
    2 # 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.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: \n"
     5"Project-Id-Version: Genesis Simple Hooks 2.3.0\n"
    66"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"
    89"MIME-Version: 1.0\n"
    9 "Content-Type: text/plain; charset=utf-8\n"
     10"Content-Type: text/plain; charset=UTF-8\n"
    1011"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
     18msgid "Genesis Simple Hooks"
     19msgstr ""
     20
     21#. Plugin URI of the plugin
     22msgid "http://www.studiopress.com/plugins/simple-hooks"
     23msgstr ""
     24
     25#. Description of the plugin
     26msgid "Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme."
     27msgstr ""
     28
     29#. Author of the plugin
     30msgid "StudioPress"
     31msgstr ""
     32
     33#. Author URI of the plugin
     34msgid "http://www.studiopress.com/"
     35msgstr ""
     36
     37#: includes/class-genesis-simple-hooks-admin.php:161
    4338msgid "Genesis - Simple Hooks"
    4439msgstr ""
    4540
    46 #: includes/class-genesis-simple-hooks-admin.php:83
     41#: includes/class-genesis-simple-hooks-admin.php:162
    4742msgid "Simple Hooks"
    4843msgstr ""
    4944
    50 #: includes/class-genesis-simple-hooks-admin.php:150
     45#: includes/class-genesis-simple-hooks-admin.php:230
    5146msgid "Executes immediately before the closing <code>&lt;/head&gt;</code> tag."
    5247msgstr ""
    5348
    54 #: includes/class-genesis-simple-hooks-admin.php:154
    55 #: includes/class-genesis-simple-hooks-admin.php:176
     49#: includes/class-genesis-simple-hooks-admin.php:234
     50#: includes/class-genesis-simple-hooks-admin.php:256
    5651msgid "Executes immediately before the closing <code>&lt;/body&gt;</code> tag."
    5752msgstr ""
    5853
    59 #: includes/class-genesis-simple-hooks-admin.php:161
     54#: includes/class-genesis-simple-hooks-admin.php:241
    6055msgid "Executes in the document head. Genesis uses this to output the doctype."
    6156msgstr ""
    6257
    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
     59msgid "Executes in the document head. Genesis uses this to output the document title."
     60msgstr ""
     61
     62#: includes/class-genesis-simple-hooks-admin.php:249
    7063msgid "Executes in the document head. Genesis uses this to output meta tags."
    7164msgstr ""
    7265
    73 #: includes/class-genesis-simple-hooks-admin.php:173
     66#: includes/class-genesis-simple-hooks-admin.php:253
    7467msgid "Executes immediately after the opening <code>&lt;body&gt;</code> tag."
    7568msgstr ""
    7669
    77 #: includes/class-genesis-simple-hooks-admin.php:182
     70#: includes/class-genesis-simple-hooks-admin.php:262
    7871msgid "Executes immediately before the header."
    7972msgstr ""
    8073
    81 #: includes/class-genesis-simple-hooks-admin.php:185
     74#: includes/class-genesis-simple-hooks-admin.php:265
    8275msgid "Genesis uses this hook to output the default header."
    8376msgstr ""
    8477
    85 #: includes/class-genesis-simple-hooks-admin.php:189
     78#: includes/class-genesis-simple-hooks-admin.php:269
    8679msgid "Executes inside the page header, immediately before the header widget area."
    8780msgstr ""
    8881
    89 #: includes/class-genesis-simple-hooks-admin.php:192
     82#: includes/class-genesis-simple-hooks-admin.php:272
    9083msgid "Executes immediately after the header."
    9184msgstr ""
    9285
    93 #: includes/class-genesis-simple-hooks-admin.php:195
     86#: includes/class-genesis-simple-hooks-admin.php:275
    9487msgid "Executes inside the header. Genesis uses this hook to output the site title."
    9588msgstr ""
    9689
    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
     91msgid "Executes inside the header. Genesis uses this hook to output the site description."
     92msgstr ""
     93
     94#: includes/class-genesis-simple-hooks-admin.php:286
    10495msgid "Executes before the content-sidebar-wrap opening markup."
    10596msgstr ""
    10697
    107 #: includes/class-genesis-simple-hooks-admin.php:209
     98#: includes/class-genesis-simple-hooks-admin.php:289
    10899msgid "Executes after the content-sidebar-wrap closing markup."
    109100msgstr ""
    110101
    111 #: includes/class-genesis-simple-hooks-admin.php:212
     102#: includes/class-genesis-simple-hooks-admin.php:292
    112103msgid "Executes before the content opening markup."
    113104msgstr ""
    114105
    115 #: includes/class-genesis-simple-hooks-admin.php:215
     106#: includes/class-genesis-simple-hooks-admin.php:295
    116107msgid "Executes after the content closing markup."
    117108msgstr ""
    118109
    119 #: includes/class-genesis-simple-hooks-admin.php:221
     110#: includes/class-genesis-simple-hooks-admin.php:301
    120111msgid "Executes before the loop."
    121112msgstr ""
    122113
    123 #: includes/class-genesis-simple-hooks-admin.php:224
     114#: includes/class-genesis-simple-hooks-admin.php:304
    124115msgid "Executes in the content section. Genesis uses this hook to output the loop."
    125116msgstr ""
    126117
    127 #: includes/class-genesis-simple-hooks-admin.php:228
     118#: includes/class-genesis-simple-hooks-admin.php:308
    128119msgid "Executes after the loop."
    129120msgstr ""
    130121
    131 #: includes/class-genesis-simple-hooks-admin.php:231
     122#: includes/class-genesis-simple-hooks-admin.php:311
    132123msgid "Executes after the WordPress loop endwhile."
    133124msgstr ""
    134125
    135 #: includes/class-genesis-simple-hooks-admin.php:235
     126#: includes/class-genesis-simple-hooks-admin.php:315
    136127msgid "Executes in the loop's else statement."
    137128msgstr ""
    138129
    139 #: includes/class-genesis-simple-hooks-admin.php:239
     130#: includes/class-genesis-simple-hooks-admin.php:319
    140131msgid "Executes if the loop actions are reset."
    141132msgstr ""
    142133
    143 #: includes/class-genesis-simple-hooks-admin.php:248
     134#: includes/class-genesis-simple-hooks-admin.php:328
    144135msgid "Executes before the entry."
    145136msgstr ""
    146137
    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
     139msgid "Executes as part of the entry. Genesis uses this hook to output the entry header."
     140msgstr ""
     141
     142#: includes/class-genesis-simple-hooks-admin.php:335
    154143msgid "Executes before the entry content"
    155144msgstr ""
    156145
    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
     147msgid "Executes as part of the entry. Genesis uses this hook to output the entry content."
     148msgstr ""
     149
     150#: includes/class-genesis-simple-hooks-admin.php:343
    164151msgid "Executes after the entry content"
    165152msgstr ""
    166153
    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
     155msgid "Executes as part of the entry. Genesis uses this hook to output the entry footer."
     156msgstr ""
     157
     158#: includes/class-genesis-simple-hooks-admin.php:351
    174159msgid "Executes after the entry."
    175160msgstr ""
    176161
    177 #: includes/class-genesis-simple-hooks-admin.php:281
     162#: includes/class-genesis-simple-hooks-admin.php:361
    178163msgid "Executes before the post opening markup."
    179164msgstr ""
    180165
    181 #: includes/class-genesis-simple-hooks-admin.php:284
     166#: includes/class-genesis-simple-hooks-admin.php:364
    182167msgid "Executes after the post closing markup."
    183168msgstr ""
    184169
    185 #: includes/class-genesis-simple-hooks-admin.php:288
     170#: includes/class-genesis-simple-hooks-admin.php:368
    186171msgid "Executes before the post title."
    187172msgstr ""
    188173
    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
     175msgid "Executes as part of the post. Genesis uses this hook to output the post title."
     176msgstr ""
     177
     178#: includes/class-genesis-simple-hooks-admin.php:376
    196179msgid "Executes after the post title."
    197180msgstr ""
    198181
    199 #: includes/class-genesis-simple-hooks-admin.php:299
     182#: includes/class-genesis-simple-hooks-admin.php:379
    200183msgid "Executes before the post content."
    201184msgstr ""
    202185
    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
     187msgid "Executes as part of the post. Genesis uses this hook to output the post content."
     188msgstr ""
     189
     190#: includes/class-genesis-simple-hooks-admin.php:387
    210191msgid "Executes after the post content."
    211192msgstr ""
    212193
    213 #: includes/class-genesis-simple-hooks-admin.php:314
     194#: includes/class-genesis-simple-hooks-admin.php:394
    214195msgid "Executes before the comments section opening markup."
    215196msgstr ""
    216197
    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
     199msgid "Executes after an entry. Genesis uses this hook to output the comments section."
     200msgstr ""
     201
     202#: includes/class-genesis-simple-hooks-admin.php:401
     203msgid "Executes in the comments section. Genesis uses this hook to output the comment list."
     204msgstr ""
     205
     206#: includes/class-genesis-simple-hooks-admin.php:405
    230207msgid "Executes after the comments section closing markup."
    231208msgstr ""
    232209
    233 #: includes/class-genesis-simple-hooks-admin.php:328
     210#: includes/class-genesis-simple-hooks-admin.php:408
    234211msgid "Executes before the pings section opening markup."
    235212msgstr ""
    236213
    237 #: includes/class-genesis-simple-hooks-admin.php:331
     214#: includes/class-genesis-simple-hooks-admin.php:411
    238215msgid "Executes after an entry. Genesis uses this hook to output the pings section."
    239216msgstr ""
    240217
    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
     219msgid "Executes in the pings section. Genesis uses this hook to output the ping list."
     220msgstr ""
     221
     222#: includes/class-genesis-simple-hooks-admin.php:419
    248223msgid "Executes after the ping section closing markup."
    249224msgstr ""
    250225
    251 #: includes/class-genesis-simple-hooks-admin.php:342
     226#: includes/class-genesis-simple-hooks-admin.php:422
    252227msgid "Executes before a single comment."
    253228msgstr ""
    254229
    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
     231msgid "Executes in the comment list. Genesis uses this hook to output a single comment."
     232msgstr ""
     233
     234#: includes/class-genesis-simple-hooks-admin.php:428
    262235msgid "Executes after a single comment."
    263236msgstr ""
    264237
    265 #: includes/class-genesis-simple-hooks-admin.php:351
     238#: includes/class-genesis-simple-hooks-admin.php:431
    266239msgid "Executes before the comment form."
    267240msgstr ""
    268241
    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
     243msgid "Executes after the comment and ping list. Genesis uses this hook to output the comment form."
     244msgstr ""
     245
     246#: includes/class-genesis-simple-hooks-admin.php:438
    276247msgid "Executes after the comment form."
    277248msgstr ""
    278249
    279 #: includes/class-genesis-simple-hooks-admin.php:364
     250#: includes/class-genesis-simple-hooks-admin.php:444
    280251msgid "Executes before the primary sidebar."
    281252msgstr ""
    282253
    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
     255msgid "Executes after the content section in 2+ column layouts. Genesis uses this hook to output the primary sidebar."
     256msgstr ""
     257
     258#: includes/class-genesis-simple-hooks-admin.php:451
    290259msgid "Executes after the primary sidebar."
    291260msgstr ""
    292261
    293 #: includes/class-genesis-simple-hooks-admin.php:374
     262#: includes/class-genesis-simple-hooks-admin.php:454
    294263msgid "Executes before the primary sidebar widget area."
    295264msgstr ""
    296265
    297 #: includes/class-genesis-simple-hooks-admin.php:377
     266#: includes/class-genesis-simple-hooks-admin.php:457
    298267msgid "Executes after the primary sidebar widget area."
    299268msgstr ""
    300269
    301 #: includes/class-genesis-simple-hooks-admin.php:380
     270#: includes/class-genesis-simple-hooks-admin.php:460
    302271msgid "Executes before the secondary sidebar."
    303272msgstr ""
    304273
    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
     275msgid "Executes after the primary sidebar in 3+ column layouts. Genesis uses this hook to output the secondary sidebar."
     276msgstr ""
     277
     278#: includes/class-genesis-simple-hooks-admin.php:467
    312279msgid "Executes after the secondary sidebar."
    313280msgstr ""
    314281
    315 #: includes/class-genesis-simple-hooks-admin.php:390
     282#: includes/class-genesis-simple-hooks-admin.php:470
    316283msgid "Executes before the secondary sidebar widget area."
    317284msgstr ""
    318285
    319 #: includes/class-genesis-simple-hooks-admin.php:393
     286#: includes/class-genesis-simple-hooks-admin.php:473
    320287msgid "Executes after the secondary sidebar widget area."
    321288msgstr ""
    322289
    323 #: includes/class-genesis-simple-hooks-admin.php:399
     290#: includes/class-genesis-simple-hooks-admin.php:479
    324291msgid "Executes before the site footer."
    325292msgstr ""
    326293
    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
     295msgid "Executes after the content and sidebars. Genesis uses this hook to output the site footer."
     296msgstr ""
     297
     298#: includes/class-genesis-simple-hooks-admin.php:486
    334299msgid "Executes after the site footer."
    335300msgstr ""
    336301
    337 #: includes/class-genesis-simple-hooks-admin.php:412
     302#: includes/class-genesis-simple-hooks-admin.php:492
    338303msgid "Executes after the form on the the import/export screen."
    339304msgstr ""
    340305
    341 #: includes/class-genesis-simple-hooks-admin.php:415
     306#: includes/class-genesis-simple-hooks-admin.php:495
    342307msgid "Executes during the export function."
    343308msgstr ""
    344309
    345 #: includes/class-genesis-simple-hooks-admin.php:418
     310#: includes/class-genesis-simple-hooks-admin.php:498
    346311msgid "Executes during the import function."
    347312msgstr ""
    348313
    349 #: includes/class-genesis-simple-hooks-admin.php:421
     314#: includes/class-genesis-simple-hooks-admin.php:501
    350315msgid "Executes in the function that adds metaboxes to the theme settings screen."
    351316msgstr ""
    352317
    353 #: includes/class-genesis-simple-hooks-admin.php:424
     318#: includes/class-genesis-simple-hooks-admin.php:504
    354319msgid "Executes after Genesis upgrades itself."
    355320msgstr ""
    356321
    357 #: includes/class-genesis-simple-hooks-admin.php:485
     322#: includes/class-genesis-simple-hooks-admin.php:574
    358323msgid "Hook"
    359324msgstr ""
    360325
    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
    362328msgid "Unhook <code>%s()</code> function from this hook?"
    363329msgstr ""
    364330
    365 #: includes/class-genesis-simple-hooks-admin.php:515
     331#: includes/class-genesis-simple-hooks-admin.php:609
    366332msgid "Execute Shortcodes on this hook?"
    367333msgstr ""
    368334
    369 #: includes/class-genesis-simple-hooks-admin.php:523
     335#: includes/class-genesis-simple-hooks-admin.php:617
    370336msgid "Execute PHP on this hook?"
    371337msgstr ""
    372338
    373 #: includes/class-genesis-simple-hooks-admin.php:543
     339#: includes/class-genesis-simple-hooks-admin.php:636
    374340msgid "WordPress Hooks"
    375341msgstr ""
    376342
    377 #: includes/class-genesis-simple-hooks-admin.php:544
     343#: includes/class-genesis-simple-hooks-admin.php:637
    378344msgid "Document Hooks"
    379345msgstr ""
    380346
    381 #: includes/class-genesis-simple-hooks-admin.php:545
     347#: includes/class-genesis-simple-hooks-admin.php:638
    382348msgid "Header Hooks"
    383349msgstr ""
    384350
    385 #: includes/class-genesis-simple-hooks-admin.php:546
     351#: includes/class-genesis-simple-hooks-admin.php:639
    386352msgid "Content Hooks"
    387353msgstr ""
    388354
    389 #: includes/class-genesis-simple-hooks-admin.php:547
     355#: includes/class-genesis-simple-hooks-admin.php:640
    390356msgid "Loop Hooks"
    391357msgstr ""
    392358
    393 #: includes/class-genesis-simple-hooks-admin.php:550
     359#: includes/class-genesis-simple-hooks-admin.php:643
    394360msgid "Entry Hooks"
    395361msgstr ""
    396362
    397 #: includes/class-genesis-simple-hooks-admin.php:552
     363#: includes/class-genesis-simple-hooks-admin.php:645
    398364msgid "Post/Page Hooks"
    399365msgstr ""
    400366
    401 #: includes/class-genesis-simple-hooks-admin.php:554
     367#: includes/class-genesis-simple-hooks-admin.php:648
    402368msgid "Comment Hooks"
    403369msgstr ""
    404370
    405 #: includes/class-genesis-simple-hooks-admin.php:555
     371#: includes/class-genesis-simple-hooks-admin.php:649
    406372msgid "Sidebar Hooks"
    407373msgstr ""
    408374
    409 #: includes/class-genesis-simple-hooks-admin.php:556
     375#: includes/class-genesis-simple-hooks-admin.php:650
    410376msgid "Footer Hooks"
    411377msgstr ""
    412378
    413 #: includes/class-genesis-simple-hooks-admin.php:564
    414 #: includes/class-genesis-simple-hooks-admin.php:572
    415 #: includes/class-genesis-simple-hooks-admin.php:580
    416 #: includes/class-genesis-simple-hooks-admin.php:588
    417 #: includes/class-genesis-simple-hooks-admin.php:596
    418 #: includes/class-genesis-simple-hooks-admin.php:604
    419 #: includes/class-genesis-simple-hooks-admin.php:612
    420 #: includes/class-genesis-simple-hooks-admin.php:620
    421 #: includes/class-genesis-simple-hooks-admin.php:628
    422 #: includes/class-genesis-simple-hooks-admin.php:636
    423 #: includes/class-genesis-simple-hooks-admin.php:644
     379#: 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
    424390msgid "Save Changes"
    425391msgstr ""
  • genesis-simple-hooks/tags/2.3.0/package.json

    r1831101 r2134959  
    77  },
    88  "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"
    2511  },
    2612  "plugin": {
     
    3016    "author": "StudioPress",
    3117    "authoruri": "http://www.studiopress.com/",
    32     "version": "2.2.1",
     18    "version": "2.3.0",
    3319    "license": "GPL-2.0+",
    3420    "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 */
    519
    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' );
     20require_once plugin_dir_path( __FILE__ ) . 'genesis-simple-hooks.php';
  • genesis-simple-hooks/tags/2.3.0/readme.txt

    r1831159 r2134959  
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5553118
    44Tags: hooks, genesis, genesiswp, studiopress
    5 Requires at least: 4.9.0
    6 Tested up to: 4.9.4
    7 Stable tag: 2.2.1
     5Requires at least: 4.7.2
     6Tested up to: 5.2.2
     7Stable tag: 2.3.0
    88
    99This 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.
     
    4848`
    4949<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>
    5151</div>
    5252`
     
    5555`
    5656<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>
    5858</div>
    5959`
     
    7272
    7373== 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.
    7480
    7581= 2.2.1 =
     
    150156= 0.1 =
    151157* Initial Release
    152 
    153 
    154 
    155 
    156 
    157 
    158 
    159 
  • genesis-simple-hooks/trunk/genesis-simple-hooks.php

    r1831101 r2134959  
    11<?php
     2/**
     3 * This file handles the creation of the Simple Hooks admin menu.
     4 *
     5 * @package genesis-simple-hooks
     6 */
    27
    3 class Genesis_Simple_Hooks {
     8define( 'GENESIS_SIMPLE_HOOKS_DIR', plugin_dir_path( __FILE__ ) );
     9define( 'GENESIS_SIMPLE_HOOKS_URL', plugins_url( '', __FILE__ ) );
     10define( 'GENESIS_SIMPLE_HOOKS_VERSION', '2.3.0' );
    411
    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 }
     12require_once GENESIS_SIMPLE_HOOKS_DIR . '/includes/class-genesis-simple-hooks.php';
    19413
    19514/**
     
    19817 * @since 0.9.0
    19918 */
    200 function Genesis_Simple_Hooks() {
     19function genesis_simple_hooks() {
    20120
    20221    static $object;
    20322
    204     if ( null == $object ) {
    205         $object = new Genesis_Simple_Hooks;
     23    if ( null === $object ) {
     24        $object = new Genesis_Simple_Hooks();
    20625    }
    20726
     
    20928}
    21029/**
    211  * Initialize the object on `plugins_loaded`.
     30 * Initialize the object on `plugins_loaded`.
    21231 */
    21332add_action( 'plugins_loaded', array( Genesis_Simple_Hooks(), 'init' ) );
  • genesis-simple-hooks/trunk/includes/class-genesis-simple-hooks-admin.php

    r1831101 r2134959  
    22/**
    33 * This file handles the creation of the Simple Hooks admin menu.
     4 *
     5 * @package genesis-simple-hooks
    46 */
    5 
    67
    78/**
     
    1718     *
    1819     * @since 2.2.0
     20     *
     21     * @var $settings_field Settings Field
    1922     */
    2023    public $settings_field = 'simplehooks-settings';
    2124
     25    /**
     26     * WP Hooks.
     27     *
     28     * @since 2.2.0
     29     *
     30     * @var $wp_hooks WP Hooks
     31     */
    2232    public $wp_hooks;
    2333
     34    /**
     35     * Document Hooks.
     36     *
     37     * @since 2.2.0
     38     *
     39     * @var $document_hooks Document Hooks
     40     */
    2441    public $document_hooks;
    2542
     43    /**
     44     * Header Hooks.
     45     *
     46     * @since 2.2.0
     47     *
     48     * @var $header_hooks Header Hooks
     49     */
    2650    public $header_hooks;
    2751
     52    /**
     53     * Content Hooks.
     54     *
     55     * @since 2.2.0
     56     *
     57     * @var $content_hooks Content Hooks
     58     */
    2859    public $content_hooks;
    2960
     61    /**
     62     * Loop Hooks.
     63     *
     64     * @since 2.2.0
     65     *
     66     * @var $loop_hooks Loop Hooks
     67     */
    3068    public $loop_hooks;
    3169
     70    /**
     71     * Entry Hooks.
     72     *
     73     * @since 2.2.0
     74     *
     75     * @var $settings_field Entry Hooks
     76     */
    3277    public $entry_hooks;
    3378
     79    /**
     80     * Post Hooks.
     81     *
     82     * @since 2.2.0
     83     *
     84     * @var $settings_field Post Hooks
     85     */
    3486    public $post_hooks;
    3587
     88    /**
     89     * Comment Hooks.
     90     *
     91     * @since 2.2.0
     92     *
     93     * @var $comment_hooks Comment Hooks
     94     */
    3695    public $comment_hooks;
    3796
     97    /**
     98     * Sidebar Hooks.
     99     *
     100     * @since 2.2.0
     101     *
     102     * @var $sidebar_hooks Sidebar Hooks
     103     */
    38104    public $sidebar_hooks;
    39105
     106    /**
     107     * Footer Hooks.
     108     *
     109     * @since 2.2.0
     110     *
     111     * @var $footer_hooks Footer Hooks
     112     */
    40113    public $footer_hooks;
    41114
     115    /**
     116     * Admin Hooks.
     117     *
     118     * @since 2.2.0
     119     *
     120     * @var $admin_hooks Admin Hooks
     121     */
    42122    public $admin_hooks;
    43123
     
    46126     *
    47127     * @since 1.8.0
    48      *
    49128     */
    50129    public function __construct() {
    51130
    52         // For backward compatibility
     131        // For backward compatibility.
    53132        define( 'SIMPLEHOOKS_SETTINGS_FIELD', $this->settings_field );
    54133
     
    81160                'parent_slug' => 'genesis',
    82161                '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            ),
    85164        );
    86165
     
    89168        );
    90169
    91         // Create the page
     170        // Create the page.
    92171        $this->create( $page_id, $menu_ops, $page_ops, $this->settings_field, $this->get_default_settings() );
    93172
     
    98177     *
    99178     * @since 1.8.0
    100      *
    101179     */
    102180    public function scripts() {
    103181
    104         // Load parent scripts as well as Genesis admin scripts */
     182        // Load parent scripts as well as Genesis admin scripts.
    105183        parent::scripts();
    106184        genesis_scripts()->enqueue_and_localize_admin_scripts();
     
    112190     *
    113191     * @since 2.2.0
     192     *
     193     * @param Array $newvalue New value.
     194     * @param Array $oldvalue Old value.
    114195     */
    115196    public function save( $newvalue, $oldvalue ) {
     
    132213
    133214            }
    134 
    135215        }
    136216
     
    147227
    148228        $this->wp_hooks = array(
    149             'wp_head' => array(
     229            'wp_head'   => array(
    150230                'description' => __( 'Executes immediately before the closing <code>&lt;/head&gt;</code> tag.', 'genesis-simple-hooks' ),
    151231                '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' ),
     
    162242                'unhook'      => array( 'genesis_do_doctype' ),
    163243            ),
    164             'genesis_title' => array(
     244            'genesis_title'   => array(
    165245                'description' => __( 'Executes in the document head. Genesis uses this to output the document title.', 'genesis-simple-hooks' ),
    166246                'unhook'      => array( 'genesis_do_title' ),
    167247            ),
    168             'genesis_meta' => array(
     248            'genesis_meta'    => array(
    169249                '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(
    173253                'description' => __( 'Executes immediately after the opening <code>&lt;body&gt;</code> tag.', 'genesis-simple-hooks' ),
    174254            ),
    175             'genesis_after' => array(
     255            'genesis_after'   => array(
    176256                'description' => __( 'Executes immediately before the closing <code>&lt;/body&gt;</code> tag.', 'genesis-simple-hooks' ),
    177257            ),
     
    179259
    180260        $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(
    185265                'description' => __( 'Genesis uses this hook to output the default header.', 'genesis-simple-hooks' ),
    186266                'unhook'      => array( 'genesis_do_header' ),
    187267            ),
    188             'genesis_header_right' => array(
     268            'genesis_header_right'     => array(
    189269                'description' => __( 'Executes inside the page header, immediately before the header widget area.', 'genesis-simple-hooks' ),
    190270            ),
    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' ),
    196276                'unhook'      => array( 'genesis_seo_site_title' ),
    197277            ),
    198278            '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' ),
    200280                'unhook'      => array( 'genesis_seo_site_description' ),
    201281            ),
     
    206286                'description' => __( 'Executes before the content-sidebar-wrap opening markup.', 'genesis-simple-hooks' ),
    207287            ),
    208             'genesis_after_content_sidebar_wrap' => array(
     288            'genesis_after_content_sidebar_wrap'  => array(
    209289                'description' => __( 'Executes after the content-sidebar-wrap closing markup.', 'genesis-simple-hooks' ),
    210290            ),
    211             'genesis_before_content' => array(
     291            'genesis_before_content'              => array(
    212292                'description' => __( 'Executes before the content opening markup.', 'genesis-simple-hooks' ),
    213293            ),
    214             'genesis_after_content' => array(
     294            'genesis_after_content'               => array(
    215295                'description' => __( 'Executes after the content closing markup.', 'genesis-simple-hooks' ),
    216296            ),
     
    218298
    219299        $this->loop_hooks = array(
    220             'genesis_before_loop' => array(
     300            'genesis_before_loop'    => array(
    221301                'description' => __( 'Executes before the loop.', 'genesis-simple-hooks' ),
    222302            ),
    223             'genesis_loop' => array(
     303            'genesis_loop'           => array(
    224304                'description' => __( 'Executes in the content section. Genesis uses this hook to output the loop.', 'genesis-simple-hooks' ),
    225305                'unhook'      => array( 'genesis_do_loop' ),
    226306            ),
    227             'genesis_after_loop' => array(
     307            'genesis_after_loop'     => array(
    228308                'description' => __( 'Executes after the loop.', 'genesis-simple-hooks' ),
    229309            ),
     
    232312                'unhook'      => array( 'genesis_posts_nav' ),
    233313            ),
    234             'genesis_loop_else' => array(
     314            'genesis_loop_else'      => array(
    235315                'description' => __( "Executes in the loop's else statement.", 'genesis-simple-hooks' ),
    236316                'unhook'      => array( 'genesis_do_noposts' ),
    237317            ),
    238             'genesis_reset_loops' => array(
     318            'genesis_reset_loops'    => array(
    239319                'description' => __( 'Executes if the loop actions are reset.', 'genesis-simple-hooks' ),
    240320            ),
     
    245325         */
    246326        $this->entry_hooks = array(
    247             'genesis_before_entry' => array(
     327            'genesis_before_entry'         => array(
    248328                'description' => __( 'Executes before the entry.', 'genesis-simple-hooks' ),
    249329            ),
    250             'genesis_entry_header' => array(
     330            'genesis_entry_header'         => array(
    251331                'description' => __( 'Executes as part of the entry. Genesis uses this hook to output the entry header.', 'genesis-simple-hooks' ),
    252332                'unhook'      => array( 'genesis_do_post_title' ),
     
    256336                'unhook'      => array( 'genesis_do_post_content' ),
    257337            ),
    258             'genesis_entry_content' => array(
     338            'genesis_entry_content'        => array(
    259339                'description' => __( 'Executes as part of the entry. Genesis uses this hook to output the entry content.', 'genesis-simple-hooks' ),
    260340                'unhook'      => array( 'genesis_do_post_content' ),
    261341            ),
    262             'genesis_after_entry_content' => array(
     342            'genesis_after_entry_content'  => array(
    263343                'description' => __( 'Executes after the entry content', 'genesis-simple-hooks' ),
    264344                'unhook'      => array( 'genesis_do_post_content' ),
    265345            ),
    266             'genesis_entry_footer' => array(
     346            'genesis_entry_footer'         => array(
    267347                'description' => __( 'Executes as part of the entry. Genesis uses this hook to output the entry footer.', 'genesis-simple-hooks' ),
    268348                'unhook'      => array( 'genesis_post_meta' ),
    269349            ),
    270             'genesis_after_entry' => array(
     350            'genesis_after_entry'          => array(
    271351                'description' => __( 'Executes after the entry.', 'genesis-simple-hooks' ),
    272352                'unhook'      => array( 'genesis_adjacent_entry_nav', 'genesis_get_comments_template' ),
     
    275355
    276356        /**
    277          * xHTML post hooks
     357         * The xHTML post hooks
    278358         */
    279359        $this->post_hooks = array(
    280             'genesis_before_post' => array(
     360            'genesis_before_post'         => array(
    281361                'description' => __( 'Executes before the post opening markup.', 'genesis-simple-hooks' ),
    282362            ),
    283             'genesis_after_post' => array(
     363            'genesis_after_post'          => array(
    284364                'description' => __( 'Executes after the post closing markup.', 'genesis-simple-hooks' ),
    285365                'unhook'      => array( 'genesis_do_author_box_single', 'genesis_get_comments_template' ),
    286366            ),
    287             'genesis_before_post_title' => array(
     367            'genesis_before_post_title'   => array(
    288368                'description' => __( 'Executes before the post title.', 'genesis-simple-hooks' ),
    289369                'unhook'      => array( 'genesis_do_post_format_image' ),
    290370            ),
    291             'genesis_post_title' => array(
     371            'genesis_post_title'          => array(
    292372                'description' => __( 'Executes as part of the post. Genesis uses this hook to output the post title.', 'genesis-simple-hooks' ),
    293373                'unhook'      => array( 'genesis_do_post_title' ),
    294374            ),
    295             'genesis_after_post_title' => array(
     375            'genesis_after_post_title'    => array(
    296376                'description' => __( 'Executes after the post title.', 'genesis-simple-hooks' ),
    297377            ),
     
    300380                'unhook'      => array( 'genesis_post_info' ),
    301381            ),
    302             'genesis_post_content' => array(
     382            'genesis_post_content'        => array(
    303383                'description' => __( 'Executes as part of the post. Genesis uses this hook to output the post content.', 'genesis-simple-hooks' ),
    304384                'unhook'      => array( 'genesis_do_post_image', 'genesis_do_post_content', 'genesis_do_post_permalink', 'genesis_do_post_content_nav' ),
    305385            ),
    306             'genesis_after_post_content' => array(
     386            'genesis_after_post_content'  => array(
    307387                'description' => __( 'Executes after the post content.', 'genesis-simple-hooks' ),
    308388                'unhook'      => array( 'genesis_post_meta' ),
     
    311391
    312392        $this->comment_hooks = array(
    313             'genesis_before_comments' => array(
     393            'genesis_before_comments'     => array(
    314394                'description' => __( 'Executes before the comments section opening markup.', 'genesis-simple-hooks' ),
    315395            ),
    316             'genesis_comments' => array(
     396            'genesis_comments'            => array(
    317397                'description' => __( 'Executes after an entry. Genesis uses this hook to output the comments section.', 'genesis-simple-hooks' ),
    318398                'unhook'      => array( 'genesis_do_comments' ),
    319399            ),
    320             'genesis_list_comments' => array(
     400            'genesis_list_comments'       => array(
    321401                'description' => __( 'Executes in the comments section. Genesis uses this hook to output the comment list.', 'genesis-simple-hooks' ),
    322402                'unhook'      => array( 'genesis_default_list_comments' ),
    323403            ),
    324             'genesis_after_comments' => array(
     404            'genesis_after_comments'      => array(
    325405                'description' => __( 'Executes after the comments section closing markup.', 'genesis-simple-hooks' ),
    326406            ),
    327             'genesis_before_pings' => array(
     407            'genesis_before_pings'        => array(
    328408                'description' => __( 'Executes before the pings section opening markup.', 'genesis-simple-hooks' ),
    329409            ),
    330             'genesis_pings' => array(
     410            'genesis_pings'               => array(
    331411                'description' => __( 'Executes after an entry. Genesis uses this hook to output the pings section.', 'genesis-simple-hooks' ),
    332412                'unhook'      => array( 'genesis_do_pings' ),
    333413            ),
    334             'genesis_list_pings' => array(
     414            'genesis_list_pings'          => array(
    335415                'description' => __( 'Executes in the pings section. Genesis uses this hook to output the ping list.', 'genesis-simple-hooks' ),
    336416                'unhook'      => array( 'genesis_default_list_pings' ),
    337417            ),
    338             'genesis_after_pings' => array(
     418            'genesis_after_pings'         => array(
    339419                'description' => __( 'Executes after the ping section closing markup.', 'genesis-simple-hooks' ),
    340420            ),
    341             'genesis_before_comment' => array(
     421            'genesis_before_comment'      => array(
    342422                'description' => __( 'Executes before a single comment.', 'genesis-simple-hooks' ),
    343423            ),
    344             'genesis_comment' => array(
     424            'genesis_comment'             => array(
    345425                'description' => __( 'Executes in the comment list. Genesis uses this hook to output a single comment.', 'genesis-simple-hooks' ),
    346426            ),
    347             'genesis_after_comment' => array(
     427            'genesis_after_comment'       => array(
    348428                'description' => __( 'Executes after a single comment.', 'genesis-simple-hooks' ),
    349429            ),
     
    351431                'description' => __( 'Executes before the comment form.', 'genesis-simple-hooks' ),
    352432            ),
    353             'genesis_comment_form' => array(
     433            'genesis_comment_form'        => array(
    354434                'description' => __( 'Executes after the comment and ping list. Genesis uses this hook to output the comment form.', 'genesis-simple-hooks' ),
    355435                'unhook'      => array( 'genesis_do_comment_form' ),
    356436            ),
    357             'genesis_after_comment_form' => array(
     437            'genesis_after_comment_form'  => array(
    358438                'description' => __( 'Executes after the comment form.', 'genesis-simple-hooks' ),
    359439            ),
     
    361441
    362442        $this->sidebar_hooks = array(
    363             'genesis_before_sidebar' => array(
     443            'genesis_before_sidebar'                 => array(
    364444                'description' => __( 'Executes before the primary sidebar.', 'genesis-simple-hooks' ),
    365445            ),
    366             'genesis_sidebar' => array(
     446            'genesis_sidebar'                        => array(
    367447                'description' => __( 'Executes after the content section in 2+ column layouts. Genesis uses this hook to output the primary sidebar.', 'genesis-simple-hooks' ),
    368448                'unhook'      => array( 'genesis_do_sidebar' ),
    369449            ),
    370             'genesis_after_sidebar' => array(
     450            'genesis_after_sidebar'                  => array(
    371451                'description' => __( 'Executes after the primary sidebar.', 'genesis-simple-hooks' ),
    372452            ),
    373             'genesis_before_sidebar_widget_area' => array(
     453            'genesis_before_sidebar_widget_area'     => array(
    374454                'description' => __( 'Executes before the primary sidebar widget area.', 'genesis-simple-hooks' ),
    375455            ),
    376             'genesis_after_sidebar_widget_area' => array(
     456            'genesis_after_sidebar_widget_area'      => array(
    377457                'description' => __( 'Executes after the primary sidebar widget area.', 'genesis-simple-hooks' ),
    378458            ),
    379             'genesis_before_sidebar_alt' => array(
     459            'genesis_before_sidebar_alt'             => array(
    380460                'description' => __( 'Executes before the secondary sidebar.', 'genesis-simple-hooks' ),
    381461            ),
    382             'genesis_sidebar_alt' => array(
     462            'genesis_sidebar_alt'                    => array(
    383463                'description' => __( 'Executes after the primary sidebar in 3+ column layouts. Genesis uses this hook to output the secondary sidebar.', 'genesis-simple-hooks' ),
    384464                'unhook'      => array( 'genesis_do_sidebar_alt' ),
    385465            ),
    386             'genesis_after_sidebar_alt' => array(
     466            'genesis_after_sidebar_alt'              => array(
    387467                'description' => __( 'Executes after the secondary sidebar.', 'genesis-simple-hooks' ),
    388468            ),
     
    390470                'description' => __( 'Executes before the secondary sidebar widget area.', 'genesis-simple-hooks' ),
    391471            ),
    392             'genesis_after_sidebar_alt_widget_area' => array(
     472            'genesis_after_sidebar_alt_widget_area'  => array(
    393473                'description' => __( 'Executes after the secondary sidebar widget area.', 'genesis-simple-hooks' ),
    394474            ),
     
    399479                'description' => __( 'Executes before the site footer.', 'genesis-simple-hooks' ),
    400480            ),
    401             'genesis_footer' => array(
     481            'genesis_footer'        => array(
    402482                'description' => __( 'Executes after the content and sidebars. Genesis uses this hook to output the site footer.', 'genesis-simple-hooks' ),
    403483                'unhook'      => array( 'genesis_do_footer' ),
    404484            ),
    405             'genesis_after_footer' => array(
     485            'genesis_after_footer'  => array(
    406486                'description' => __( 'Executes after the site footer.', 'genesis-simple-hooks' ),
    407487            ),
     
    409489
    410490        $this->admin_hooks = array(
    411             'genesis_import_export_form' => array(
     491            'genesis_import_export_form'       => array(
    412492                'description' => __( 'Executes after the form on the the import/export screen.', 'genesis-simple-hooks' ),
    413493            ),
    414             'genesis_export' => array(
     494            'genesis_export'                   => array(
    415495                'description' => __( 'Executes during the export function.', 'genesis-simple-hooks' ),
    416496            ),
    417             'genesis_import' => array(
     497            'genesis_import'                   => array(
    418498                'description' => __( 'Executes during the import function.', 'genesis-simple-hooks' ),
    419499            ),
     
    421501                'description' => __( 'Executes in the function that adds metaboxes to the theme settings screen.', 'genesis-simple-hooks' ),
    422502            ),
    423             'genesis_upgrade' => array(
     503            'genesis_upgrade'                  => array(
    424504                'description' => __( 'Executes after Genesis upgrades itself.', 'genesis-simple-hooks' ),
    425505                'unhook'      => array( 'genesis_upgrade_redirect' ),
     
    436516    public function get_default_settings() {
    437517
    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        );
    439526
    440527    }
     
    447534    public function get_hooks() {
    448535
    449         // Merge all hooks arrays
     536        // Merge all hooks arrays.
    450537        $hooks = array_merge(
    451538            $this->wp_hooks,
     
    462549        );
    463550
    464         // Just the keys
     551        // Just the keys.
    465552        $hooks = array_keys( $hooks );
    466553
     
    473560     *
    474561     * @since 2.2.0
     562     *
     563     * @param Array $hooks Hooks.
    475564     */
    476565    public function generate_form_markup_from_hooks( $hooks ) {
     
    478567        foreach ( (array) $hooks as $hook => $info ) {
    479568
    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 ) ) {
    482571                continue;
    483572            }
    484573
    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'] ) );
    487576
    488577            if ( isset( $info['unhook'] ) ) {
    489 
     578                $allowed_html = array(
     579                    'a' => array(
     580                        'href'   => array(),
     581                        'target' => array(),
     582                    ),
     583                );
    490584                foreach ( (array) $info['unhook'] as $function ) {
    491585                    printf(
     
    494588                        $this->settings_field . "[{$hook}][unhook][]",
    495589                        $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 ) )
    498593                    );
    499594                }
    500 
    501595            }
    502596
    503597            printf(
    504598                '<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' ) )
    507601            );
    508602
     
    511605            printf(
    512606                '<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]" ),
    514608                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' ) )
    516610            );
    517611
     
    519613                printf(
    520614                    '<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]" ),
    522616                    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' ) )
    524618                );
    525619            }
     
    534628
    535629    /**
    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     */
    541634    public function metaboxes() {
    542635
     
    547640        add_meta_box( 'simplehooks-loop-hooks', __( 'Loop Hooks', 'genesis-simple-hooks' ), array( $this, 'loop_hooks_box' ), $this->pagehook, 'main' );
    548641
    549         if ( current_theme_supports( 'html5' ) )
     642        if ( current_theme_supports( 'html5' ) ) {
    550643            add_meta_box( 'simplehooks-entry-hooks', __( 'Entry Hooks', 'genesis-simple-hooks' ), array( $this, 'html5_entry_hooks_box' ), $this->pagehook, 'main' );
    551         else
     644        } else {
    552645            add_meta_box( 'simplehooks-post-hooks', __( 'Post/Page Hooks', 'genesis-simple-hooks' ), array( $this, 'post_hooks_box' ), $this->pagehook, 'main' );
     646        }
    553647
    554648        add_meta_box( 'simplehooks-comment-hooks', __( 'Comment Hooks', 'genesis-simple-hooks' ), array( $this, 'comment_hooks_box' ), $this->pagehook, 'main' );
     
    558652    }
    559653
     654    /**
     655     * WP Hooks Box
     656     */
    560657    public function wp_hooks_box() {
    561658
     
    566663    }
    567664
     665    /**
     666     * Internal Hooks Box
     667     */
    568668    public function internal_hooks_box() {
    569669
     
    574674    }
    575675
     676    /**
     677     * Document Hooks Box
     678     */
    576679    public function document_hooks_box() {
    577680
     
    582685    }
    583686
     687    /**
     688     * Header Hooks Box
     689     */
    584690    public function header_hooks_box() {
    585691
     
    590696    }
    591697
     698    /**
     699     * Content Hooks Box
     700     */
    592701    public function content_hooks_box() {
    593702
     
    598707    }
    599708
     709    /**
     710     * Loop Hooks Box
     711     */
    600712    public function loop_hooks_box() {
    601713
     
    606718    }
    607719
     720    /**
     721     * HTML5 Entry Hooks Box
     722     */
    608723    public function html5_entry_hooks_box() {
    609724
     
    614729    }
    615730
     731    /**
     732     * Post Hooks Box
     733     */
    616734    public function post_hooks_box() {
    617735
     
    622740    }
    623741
     742    /**
     743     * Comment Hooks Box
     744     */
    624745    public function comment_hooks_box() {
    625746
     
    630751    }
    631752
     753    /**
     754     * Sidebar Hooks Box
     755     */
    632756    public function sidebar_hooks_box() {
    633757
     
    638762    }
    639763
     764    /**
     765     * Footer Hooks Box
     766     */
    640767    public function footer_hooks_box() {
    641768
  • genesis-simple-hooks/trunk/includes/deprecated.php

    r1611304 r2134959  
    11<?php
     2/**
     3 * A deprecated instance of simple hooks
     4 *
     5 * @package genesis-simple-hooks
     6 */
    27
    38/**
  • genesis-simple-hooks/trunk/includes/functions.php

    r1611304 r2134959  
    11<?php
     2/**
     3 * Additional Functions for Simple Hooks
     4 *
     5 * @package genesis-simple-hooks
     6 */
    27
    38/**
     
    510 *
    611 * @since 0.1
     12 *
     13 * @param Array $hook Hook.
     14 * @param Array $field Field.
     15 * @param Array $all All.
    716 */
    817function simplehooks_get_option( $hook = null, $field = null, $all = false ) {
     
    1625    }
    1726
    18     if ( ! array_key_exists( $hook, (array) $options ) )
     27    if ( ! array_key_exists( $hook, (array) $options ) ) {
    1928        return '';
     29    }
    2030
    21     $option = isset( $options[$hook][$field] ) ? $options[$hook][$field] : '';
     31    $option = isset( $options[ $hook ][ $field ] ) ? $options[ $hook ][ $field ] : '';
    2232
    2333    return wp_kses_stripslashes( wp_kses_decode_entities( $option ) );
     
    2838 *
    2939 * @since 0.1
     40 *
     41 * @param Array $hook Hook.
     42 * @param Array $field Field.
    3043 */
    31 function simplehooks_option($hook = null, $field = null) {
     44function simplehooks_option( $hook = null, $field = null ) {
    3245
     46    // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    3347    echo simplehooks_get_option( $hook, $field );
    3448
  • genesis-simple-hooks/trunk/languages/genesis-simple-hooks.pot

    r1611304 r2134959  
    1 # Copyright (C) 2017
    2 # 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.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: \n"
     5"Project-Id-Version: Genesis Simple Hooks 2.3.0\n"
    66"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"
    89"MIME-Version: 1.0\n"
    9 "Content-Type: text/plain; charset=utf-8\n"
     10"Content-Type: text/plain; charset=UTF-8\n"
    1011"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
     18msgid "Genesis Simple Hooks"
     19msgstr ""
     20
     21#. Plugin URI of the plugin
     22msgid "http://www.studiopress.com/plugins/simple-hooks"
     23msgstr ""
     24
     25#. Description of the plugin
     26msgid "Genesis Simple Hooks allows you easy access to the 50+ Action Hooks in the Genesis Theme."
     27msgstr ""
     28
     29#. Author of the plugin
     30msgid "StudioPress"
     31msgstr ""
     32
     33#. Author URI of the plugin
     34msgid "http://www.studiopress.com/"
     35msgstr ""
     36
     37#: includes/class-genesis-simple-hooks-admin.php:161
    4338msgid "Genesis - Simple Hooks"
    4439msgstr ""
    4540
    46 #: includes/class-genesis-simple-hooks-admin.php:83
     41#: includes/class-genesis-simple-hooks-admin.php:162
    4742msgid "Simple Hooks"
    4843msgstr ""
    4944
    50 #: includes/class-genesis-simple-hooks-admin.php:150
     45#: includes/class-genesis-simple-hooks-admin.php:230
    5146msgid "Executes immediately before the closing <code>&lt;/head&gt;</code> tag."
    5247msgstr ""
    5348
    54 #: includes/class-genesis-simple-hooks-admin.php:154
    55 #: includes/class-genesis-simple-hooks-admin.php:176
     49#: includes/class-genesis-simple-hooks-admin.php:234
     50#: includes/class-genesis-simple-hooks-admin.php:256
    5651msgid "Executes immediately before the closing <code>&lt;/body&gt;</code> tag."
    5752msgstr ""
    5853
    59 #: includes/class-genesis-simple-hooks-admin.php:161
     54#: includes/class-genesis-simple-hooks-admin.php:241
    6055msgid "Executes in the document head. Genesis uses this to output the doctype."
    6156msgstr ""
    6257
    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
     59msgid "Executes in the document head. Genesis uses this to output the document title."
     60msgstr ""
     61
     62#: includes/class-genesis-simple-hooks-admin.php:249
    7063msgid "Executes in the document head. Genesis uses this to output meta tags."
    7164msgstr ""
    7265
    73 #: includes/class-genesis-simple-hooks-admin.php:173
     66#: includes/class-genesis-simple-hooks-admin.php:253
    7467msgid "Executes immediately after the opening <code>&lt;body&gt;</code> tag."
    7568msgstr ""
    7669
    77 #: includes/class-genesis-simple-hooks-admin.php:182
     70#: includes/class-genesis-simple-hooks-admin.php:262
    7871msgid "Executes immediately before the header."
    7972msgstr ""
    8073
    81 #: includes/class-genesis-simple-hooks-admin.php:185
     74#: includes/class-genesis-simple-hooks-admin.php:265
    8275msgid "Genesis uses this hook to output the default header."
    8376msgstr ""
    8477
    85 #: includes/class-genesis-simple-hooks-admin.php:189
     78#: includes/class-genesis-simple-hooks-admin.php:269
    8679msgid "Executes inside the page header, immediately before the header widget area."
    8780msgstr ""
    8881
    89 #: includes/class-genesis-simple-hooks-admin.php:192
     82#: includes/class-genesis-simple-hooks-admin.php:272
    9083msgid "Executes immediately after the header."
    9184msgstr ""
    9285
    93 #: includes/class-genesis-simple-hooks-admin.php:195
     86#: includes/class-genesis-simple-hooks-admin.php:275
    9487msgid "Executes inside the header. Genesis uses this hook to output the site title."
    9588msgstr ""
    9689
    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
     91msgid "Executes inside the header. Genesis uses this hook to output the site description."
     92msgstr ""
     93
     94#: includes/class-genesis-simple-hooks-admin.php:286
    10495msgid "Executes before the content-sidebar-wrap opening markup."
    10596msgstr ""
    10697
    107 #: includes/class-genesis-simple-hooks-admin.php:209
     98#: includes/class-genesis-simple-hooks-admin.php:289
    10899msgid "Executes after the content-sidebar-wrap closing markup."
    109100msgstr ""
    110101
    111 #: includes/class-genesis-simple-hooks-admin.php:212
     102#: includes/class-genesis-simple-hooks-admin.php:292
    112103msgid "Executes before the content opening markup."
    113104msgstr ""
    114105
    115 #: includes/class-genesis-simple-hooks-admin.php:215
     106#: includes/class-genesis-simple-hooks-admin.php:295
    116107msgid "Executes after the content closing markup."
    117108msgstr ""
    118109
    119 #: includes/class-genesis-simple-hooks-admin.php:221
     110#: includes/class-genesis-simple-hooks-admin.php:301
    120111msgid "Executes before the loop."
    121112msgstr ""
    122113
    123 #: includes/class-genesis-simple-hooks-admin.php:224
     114#: includes/class-genesis-simple-hooks-admin.php:304
    124115msgid "Executes in the content section. Genesis uses this hook to output the loop."
    125116msgstr ""
    126117
    127 #: includes/class-genesis-simple-hooks-admin.php:228
     118#: includes/class-genesis-simple-hooks-admin.php:308
    128119msgid "Executes after the loop."
    129120msgstr ""
    130121
    131 #: includes/class-genesis-simple-hooks-admin.php:231
     122#: includes/class-genesis-simple-hooks-admin.php:311
    132123msgid "Executes after the WordPress loop endwhile."
    133124msgstr ""
    134125
    135 #: includes/class-genesis-simple-hooks-admin.php:235
     126#: includes/class-genesis-simple-hooks-admin.php:315
    136127msgid "Executes in the loop's else statement."
    137128msgstr ""
    138129
    139 #: includes/class-genesis-simple-hooks-admin.php:239
     130#: includes/class-genesis-simple-hooks-admin.php:319
    140131msgid "Executes if the loop actions are reset."
    141132msgstr ""
    142133
    143 #: includes/class-genesis-simple-hooks-admin.php:248
     134#: includes/class-genesis-simple-hooks-admin.php:328
    144135msgid "Executes before the entry."
    145136msgstr ""
    146137
    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
     139msgid "Executes as part of the entry. Genesis uses this hook to output the entry header."
     140msgstr ""
     141
     142#: includes/class-genesis-simple-hooks-admin.php:335
    154143msgid "Executes before the entry content"
    155144msgstr ""
    156145
    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
     147msgid "Executes as part of the entry. Genesis uses this hook to output the entry content."
     148msgstr ""
     149
     150#: includes/class-genesis-simple-hooks-admin.php:343
    164151msgid "Executes after the entry content"
    165152msgstr ""
    166153
    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
     155msgid "Executes as part of the entry. Genesis uses this hook to output the entry footer."
     156msgstr ""
     157
     158#: includes/class-genesis-simple-hooks-admin.php:351
    174159msgid "Executes after the entry."
    175160msgstr ""
    176161
    177 #: includes/class-genesis-simple-hooks-admin.php:281
     162#: includes/class-genesis-simple-hooks-admin.php:361
    178163msgid "Executes before the post opening markup."
    179164msgstr ""
    180165
    181 #: includes/class-genesis-simple-hooks-admin.php:284
     166#: includes/class-genesis-simple-hooks-admin.php:364
    182167msgid "Executes after the post closing markup."
    183168msgstr ""
    184169
    185 #: includes/class-genesis-simple-hooks-admin.php:288
     170#: includes/class-genesis-simple-hooks-admin.php:368
    186171msgid "Executes before the post title."
    187172msgstr ""
    188173
    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
     175msgid "Executes as part of the post. Genesis uses this hook to output the post title."
     176msgstr ""
     177
     178#: includes/class-genesis-simple-hooks-admin.php:376
    196179msgid "Executes after the post title."
    197180msgstr ""
    198181
    199 #: includes/class-genesis-simple-hooks-admin.php:299
     182#: includes/class-genesis-simple-hooks-admin.php:379
    200183msgid "Executes before the post content."
    201184msgstr ""
    202185
    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
     187msgid "Executes as part of the post. Genesis uses this hook to output the post content."
     188msgstr ""
     189
     190#: includes/class-genesis-simple-hooks-admin.php:387
    210191msgid "Executes after the post content."
    211192msgstr ""
    212193
    213 #: includes/class-genesis-simple-hooks-admin.php:314
     194#: includes/class-genesis-simple-hooks-admin.php:394
    214195msgid "Executes before the comments section opening markup."
    215196msgstr ""
    216197
    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
     199msgid "Executes after an entry. Genesis uses this hook to output the comments section."
     200msgstr ""
     201
     202#: includes/class-genesis-simple-hooks-admin.php:401
     203msgid "Executes in the comments section. Genesis uses this hook to output the comment list."
     204msgstr ""
     205
     206#: includes/class-genesis-simple-hooks-admin.php:405
    230207msgid "Executes after the comments section closing markup."
    231208msgstr ""
    232209
    233 #: includes/class-genesis-simple-hooks-admin.php:328
     210#: includes/class-genesis-simple-hooks-admin.php:408
    234211msgid "Executes before the pings section opening markup."
    235212msgstr ""
    236213
    237 #: includes/class-genesis-simple-hooks-admin.php:331
     214#: includes/class-genesis-simple-hooks-admin.php:411
    238215msgid "Executes after an entry. Genesis uses this hook to output the pings section."
    239216msgstr ""
    240217
    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
     219msgid "Executes in the pings section. Genesis uses this hook to output the ping list."
     220msgstr ""
     221
     222#: includes/class-genesis-simple-hooks-admin.php:419
    248223msgid "Executes after the ping section closing markup."
    249224msgstr ""
    250225
    251 #: includes/class-genesis-simple-hooks-admin.php:342
     226#: includes/class-genesis-simple-hooks-admin.php:422
    252227msgid "Executes before a single comment."
    253228msgstr ""
    254229
    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
     231msgid "Executes in the comment list. Genesis uses this hook to output a single comment."
     232msgstr ""
     233
     234#: includes/class-genesis-simple-hooks-admin.php:428
    262235msgid "Executes after a single comment."
    263236msgstr ""
    264237
    265 #: includes/class-genesis-simple-hooks-admin.php:351
     238#: includes/class-genesis-simple-hooks-admin.php:431
    266239msgid "Executes before the comment form."
    267240msgstr ""
    268241
    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
     243msgid "Executes after the comment and ping list. Genesis uses this hook to output the comment form."
     244msgstr ""
     245
     246#: includes/class-genesis-simple-hooks-admin.php:438
    276247msgid "Executes after the comment form."
    277248msgstr ""
    278249
    279 #: includes/class-genesis-simple-hooks-admin.php:364
     250#: includes/class-genesis-simple-hooks-admin.php:444
    280251msgid "Executes before the primary sidebar."
    281252msgstr ""
    282253
    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
     255msgid "Executes after the content section in 2+ column layouts. Genesis uses this hook to output the primary sidebar."
     256msgstr ""
     257
     258#: includes/class-genesis-simple-hooks-admin.php:451
    290259msgid "Executes after the primary sidebar."
    291260msgstr ""
    292261
    293 #: includes/class-genesis-simple-hooks-admin.php:374
     262#: includes/class-genesis-simple-hooks-admin.php:454
    294263msgid "Executes before the primary sidebar widget area."
    295264msgstr ""
    296265
    297 #: includes/class-genesis-simple-hooks-admin.php:377
     266#: includes/class-genesis-simple-hooks-admin.php:457
    298267msgid "Executes after the primary sidebar widget area."
    299268msgstr ""
    300269
    301 #: includes/class-genesis-simple-hooks-admin.php:380
     270#: includes/class-genesis-simple-hooks-admin.php:460
    302271msgid "Executes before the secondary sidebar."
    303272msgstr ""
    304273
    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
     275msgid "Executes after the primary sidebar in 3+ column layouts. Genesis uses this hook to output the secondary sidebar."
     276msgstr ""
     277
     278#: includes/class-genesis-simple-hooks-admin.php:467
    312279msgid "Executes after the secondary sidebar."
    313280msgstr ""
    314281
    315 #: includes/class-genesis-simple-hooks-admin.php:390
     282#: includes/class-genesis-simple-hooks-admin.php:470
    316283msgid "Executes before the secondary sidebar widget area."
    317284msgstr ""
    318285
    319 #: includes/class-genesis-simple-hooks-admin.php:393
     286#: includes/class-genesis-simple-hooks-admin.php:473
    320287msgid "Executes after the secondary sidebar widget area."
    321288msgstr ""
    322289
    323 #: includes/class-genesis-simple-hooks-admin.php:399
     290#: includes/class-genesis-simple-hooks-admin.php:479
    324291msgid "Executes before the site footer."
    325292msgstr ""
    326293
    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
     295msgid "Executes after the content and sidebars. Genesis uses this hook to output the site footer."
     296msgstr ""
     297
     298#: includes/class-genesis-simple-hooks-admin.php:486
    334299msgid "Executes after the site footer."
    335300msgstr ""
    336301
    337 #: includes/class-genesis-simple-hooks-admin.php:412
     302#: includes/class-genesis-simple-hooks-admin.php:492
    338303msgid "Executes after the form on the the import/export screen."
    339304msgstr ""
    340305
    341 #: includes/class-genesis-simple-hooks-admin.php:415
     306#: includes/class-genesis-simple-hooks-admin.php:495
    342307msgid "Executes during the export function."
    343308msgstr ""
    344309
    345 #: includes/class-genesis-simple-hooks-admin.php:418
     310#: includes/class-genesis-simple-hooks-admin.php:498
    346311msgid "Executes during the import function."
    347312msgstr ""
    348313
    349 #: includes/class-genesis-simple-hooks-admin.php:421
     314#: includes/class-genesis-simple-hooks-admin.php:501
    350315msgid "Executes in the function that adds metaboxes to the theme settings screen."
    351316msgstr ""
    352317
    353 #: includes/class-genesis-simple-hooks-admin.php:424
     318#: includes/class-genesis-simple-hooks-admin.php:504
    354319msgid "Executes after Genesis upgrades itself."
    355320msgstr ""
    356321
    357 #: includes/class-genesis-simple-hooks-admin.php:485
     322#: includes/class-genesis-simple-hooks-admin.php:574
    358323msgid "Hook"
    359324msgstr ""
    360325
    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
    362328msgid "Unhook <code>%s()</code> function from this hook?"
    363329msgstr ""
    364330
    365 #: includes/class-genesis-simple-hooks-admin.php:515
     331#: includes/class-genesis-simple-hooks-admin.php:609
    366332msgid "Execute Shortcodes on this hook?"
    367333msgstr ""
    368334
    369 #: includes/class-genesis-simple-hooks-admin.php:523
     335#: includes/class-genesis-simple-hooks-admin.php:617
    370336msgid "Execute PHP on this hook?"
    371337msgstr ""
    372338
    373 #: includes/class-genesis-simple-hooks-admin.php:543
     339#: includes/class-genesis-simple-hooks-admin.php:636
    374340msgid "WordPress Hooks"
    375341msgstr ""
    376342
    377 #: includes/class-genesis-simple-hooks-admin.php:544
     343#: includes/class-genesis-simple-hooks-admin.php:637
    378344msgid "Document Hooks"
    379345msgstr ""
    380346
    381 #: includes/class-genesis-simple-hooks-admin.php:545
     347#: includes/class-genesis-simple-hooks-admin.php:638
    382348msgid "Header Hooks"
    383349msgstr ""
    384350
    385 #: includes/class-genesis-simple-hooks-admin.php:546
     351#: includes/class-genesis-simple-hooks-admin.php:639
    386352msgid "Content Hooks"
    387353msgstr ""
    388354
    389 #: includes/class-genesis-simple-hooks-admin.php:547
     355#: includes/class-genesis-simple-hooks-admin.php:640
    390356msgid "Loop Hooks"
    391357msgstr ""
    392358
    393 #: includes/class-genesis-simple-hooks-admin.php:550
     359#: includes/class-genesis-simple-hooks-admin.php:643
    394360msgid "Entry Hooks"
    395361msgstr ""
    396362
    397 #: includes/class-genesis-simple-hooks-admin.php:552
     363#: includes/class-genesis-simple-hooks-admin.php:645
    398364msgid "Post/Page Hooks"
    399365msgstr ""
    400366
    401 #: includes/class-genesis-simple-hooks-admin.php:554
     367#: includes/class-genesis-simple-hooks-admin.php:648
    402368msgid "Comment Hooks"
    403369msgstr ""
    404370
    405 #: includes/class-genesis-simple-hooks-admin.php:555
     371#: includes/class-genesis-simple-hooks-admin.php:649
    406372msgid "Sidebar Hooks"
    407373msgstr ""
    408374
    409 #: includes/class-genesis-simple-hooks-admin.php:556
     375#: includes/class-genesis-simple-hooks-admin.php:650
    410376msgid "Footer Hooks"
    411377msgstr ""
    412378
    413 #: includes/class-genesis-simple-hooks-admin.php:564
    414 #: includes/class-genesis-simple-hooks-admin.php:572
    415 #: includes/class-genesis-simple-hooks-admin.php:580
    416 #: includes/class-genesis-simple-hooks-admin.php:588
    417 #: includes/class-genesis-simple-hooks-admin.php:596
    418 #: includes/class-genesis-simple-hooks-admin.php:604
    419 #: includes/class-genesis-simple-hooks-admin.php:612
    420 #: includes/class-genesis-simple-hooks-admin.php:620
    421 #: includes/class-genesis-simple-hooks-admin.php:628
    422 #: includes/class-genesis-simple-hooks-admin.php:636
    423 #: includes/class-genesis-simple-hooks-admin.php:644
     379#: 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
    424390msgid "Save Changes"
    425391msgstr ""
  • genesis-simple-hooks/trunk/package.json

    r1831101 r2134959  
    77  },
    88  "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"
    2511  },
    2612  "plugin": {
     
    3016    "author": "StudioPress",
    3117    "authoruri": "http://www.studiopress.com/",
    32     "version": "2.2.1",
     18    "version": "2.3.0",
    3319    "license": "GPL-2.0+",
    3420    "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 */
    519
    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' );
     20require_once plugin_dir_path( __FILE__ ) . 'genesis-simple-hooks.php';
  • genesis-simple-hooks/trunk/readme.txt

    r1831159 r2134959  
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5553118
    44Tags: hooks, genesis, genesiswp, studiopress
    5 Requires at least: 4.9.0
    6 Tested up to: 4.9.4
    7 Stable tag: 2.2.1
     5Requires at least: 4.7.2
     6Tested up to: 5.2.2
     7Stable tag: 2.3.0
    88
    99This 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.
     
    4848`
    4949<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>
    5151</div>
    5252`
     
    5555`
    5656<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>
    5858</div>
    5959`
     
    7272
    7373== 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.
    7480
    7581= 2.2.1 =
     
    150156= 0.1 =
    151157* Initial Release
    152 
    153 
    154 
    155 
    156 
    157 
    158 
    159 
Note: See TracChangeset for help on using the changeset viewer.