/**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct(array('textdomain' => 'wp-proud-dashboard', 'plugin_path' => __FILE__));
     $this->hook('wp_dashboard_setup', 'remove_dashboard_meta', 100);
     // wp-admin.php callback to save proud_
     $this->hook('wp_ajax_wp-proud-checklist', 'checklist_save');
 }
예제 #2
0
 function __construct()
 {
     parent::__construct(array('textdomain' => 'wp-proud-core', 'plugin_path' => __FILE__));
     // Init on plugins loaded
     $this->hook('plugins_loaded', 'init');
     // Load scripts from libraries
     $this->hook('wp_enqueue_scripts', 'loadLibraries');
     // Load admin scripts from libraries
     $this->hook('admin_enqueue_scripts', 'loadAdminLibraries');
     // Add Javascript settings
     $this->hook('proud_settings', 'printJsSettings');
     $this->hook('admin_footer', 'printJsSettings');
     // Get the $pageInfo global var for submenu logic
     $this->hook('template_redirect', 'getPageInfo');
     // Set up image styles
     $this->hook('after_setup_theme', 'addImageSizes');
     // Add powered by content
     $this->hook('proud_footer_after', 'poweredby');
     // Shortcodes
     add_shortcode('sitename', array($this, 'shortcode_sitename'));
     add_shortcode('slogan', array($this, 'shortcode_slogan'));
     add_shortcode('title', array($this, 'shortcode_title'));
     add_shortcode('featured-image', array($this, 'shortcode_featured_image'));
     // -- ReST tweaks
     $this->hook('init', 'restPostSupport');
     $this->hook('init', 'restTaxonomySupport');
 }
예제 #3
0
 /**
  * Constructor
  *
  * @author	Konstantin Obenland
  * @since	1.0 - 16.04.2011
  * @access	public
  *
  * @return	Obenland_Wp_Search_Suggest
  */
 public function __construct()
 {
     parent::__construct(array('textdomain' => 'wp-proud-search', 'plugin_path' => __FILE__));
     // init search type with settings
     self::$search_type = get_option('search_service', self::$search_type);
     // Load parent
     require_once plugin_dir_path(__FILE__) . 'lib/search-page.class.php';
     // Load search style
     if ('google' == self::$search_type) {
         require_once plugin_dir_path(__FILE__) . 'lib/google-search-page.class.php';
         self::$provider = new ProudGoogleSearch();
     } else {
         require_once plugin_dir_path(__FILE__) . 'lib/wordpress-search-page.class.php';
         self::$provider = new ProudWordpressSearch();
     }
     // Load widgets
     $this->hook('plugins_loaded', 'init_widgets');
     // Search submit
     $this->hook('init', 'process_search');
     // Endpoints
     $this->hook('wp_ajax_wp-proud-search', 'ajax_response');
     $this->hook('wp_ajax_nopriv_wp-proud-search', 'ajax_response');
     $this->hook('wp_ajax_wpss-post-url', 'post_url');
     $this->hook('wp_ajax_nopriv_wpss-post-url', 'post_url');
     // Print in overlay?
     $this->hook('proud_navbar_overlay_search', 'proud_seach_print_search');
     // Filter unwanted searches
     add_filter('pre_get_posts', array($this, 'limit_post_types'));
 }
예제 #4
0
 function __construct()
 {
     parent::__construct(array('textdomain' => 'wp-proud-core', 'plugin_path' => __FILE__));
     // Add blue "demo" bar to footer @todo: should this be moved? @todo: make this work
     $this->hook('wp_footer', 'proud_bar');
     $this->hook('admin_footer', 'proud_bar');
     // Body classes
     add_filter('proud_body_class', [$this, 'body_class']);
     // This is needed for the demo angular app
     if ('example' === get_option('proud_stage', '')) {
         $this->hook('init', 'allow_origin');
     }
 }
예제 #5
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct(array('textdomain' => 'wp-proud-admin', 'plugin_path' => __FILE__));
     // @todo: add this in register_activation_hook, implement register_deactivation_hook
     // http://wordpress.stackexchange.com/questions/35165/how-do-i-create-a-custom-role-capability
     $this->hook('admin_init', 'add_caps');
     $this->hook('admin_enqueue_scripts', 'proud_admin_theme_style');
     $this->hook('login_enqueue_scripts', 'proud_admin_theme_style');
     $this->hook('admin_bar_menu', 'wp_admin_bar_dashboard', 20);
     $this->hook('admin_bar_menu', 'wp_admin_bar_account', 11);
     $this->hook('admin_footer_text', 'custom_footer');
     $this->hook('admin_body_class', 'add_admin_body_classes');
     // Add Google Analytics/other embed code
     add_filter('wp_footer', array($this, 'add_tracking_code'));
     add_filter('wp_head', array($this, 'add_metatag_code'));
     add_filter('srm_restrict_to_capability', array($this, 'redirect_capability'));
     // -- Hacks
     // Hide admin fields
     $this->hook('init', 'remove_post_admin_fields');
     // Hide theme selection options
     add_filter('wp_prepare_themes_for_js', array($this, 'filter_theme_options'));
     $this->hook('tiny_mce_before_init', 'tiny_mce_alter');
     //$this->hook( 'postbox_classes_post_wpseo_meta', 'minify_metabox' );  // This is done in js
 }
 function __construct()
 {
     parent::__construct(array('textdomain' => 'wp-proud-map-app', 'plugin_path' => __FILE__));
     $this->hook('plugins_loaded', 'proud_map_init_widget');
 }
예제 #7
0
 public function __construct()
 {
     parent::__construct(array('textdomain' => 'wp-proud-agency', 'plugin_path' => __FILE__));
     $this->hook('save_post', 'add_agency_social_fields', 10, 2);
     $this->hook('admin_init', 'agency_social_admin');
 }
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct(array('textdomain' => 'wp-proud-actions-app', 'plugin_path' => __FILE__));
     $this->hook('plugins_loaded', 'proud_actions_init_widgets');
     $this->hook('proud_navbar_overlay_311', 'proud_actions_print_311');
 }