plugin = Advanced_Ads_Genesis_Plugin::get_instance(); add_action( 'plugins_loaded', array( $this, 'wp_admin_plugins_loaded' ) ); } /** * load actions and filters */ public function wp_admin_plugins_loaded(){ if( ! class_exists( 'Advanced_Ads_Admin', false ) ) { // show admin notice add_action( 'admin_notices', array( $this, 'missing_plugin_notice' ) ); return; } // add sticky placement add_action( 'advanced-ads-placement-types', array( $this, 'add_placement' ) ); // content of sticky placement add_action( 'advanced-ads-placement-options-after', array( $this, 'placement_options' ), 10, 2 ); } /** * show warning if Advanced Ads js is not activated */ public function missing_plugin_notice(){ echo '
' . sprintf( __( 'Advanced Ads – Genesis Ads is an extension for the Advanced Ads plugin. Please visit wpadvancedads.com to download it for free.', AAG_SLUG ), 'https://wpadvancedads.com' ) . '
Genesis Hook Reference', AAG_SLUG ), 'http://my.studiopress.com/docs/hook-reference/' ); ?>
title * * @since 1.0.0 * @return arr $positions */ public function get_genesis_hooks(){ // list of all hooks http://my.studiopress.com/docs/hook-reference/#structural-action-hooks // only used the ones for public output in frontend here return array( __( 'Header', AAG_SLUG ) => array( 'before_header', 'header', 'after_header', 'site_title', 'site_description', ), __( 'Wrapper', AAG_SLUG ) => array( 'before_content_sidebar_wrap', 'after_content_sidebar_wrap', 'before_content', 'after_content', ), __( 'Sidebar', AAG_SLUG ) => array( 'sidebar', 'before_sidebar_widget_area', 'after_sidebar_widget_area', 'sidebar_alt', 'before_sidebar_alt_widget_area', 'after_sidebar_alt_widget_area', ), __( 'Loop', AAG_SLUG ) => array( 'before_loop', 'loop', 'after_loop', 'after_endwhile', 'loop_else', ), __( 'Content', AAG_SLUG ) => array( 'before_entry', 'after_entry', 'entry_header', 'before_entry_content', 'entry_content', 'after_entry_content', 'entry_footer', 'before_post', 'after_post', 'before_post_title', 'post_title', 'after_post_title', 'before_post_content', 'post_content', 'after_post_content', ), __( 'Comments & Pings', AAG_SLUG ) => array( 'before_comments', 'comments', 'after_comments', 'list_comments', 'before_pings', 'pings', 'after_pings', 'list_pings', 'before_comment', 'after_comment', 'before_comment_form', 'comment_form', 'after_comment_form' ), __( 'Footer', AAG_SLUG ) => array( 'before_footer', 'footer', 'after_footer', ), ); } }