function __construct($base_id = false, $name = false, $description = false, $child_class = false)
 {
     parent::__construct($base_id ? $base_id : 'proud_teaser_list', $name ? $name : __('Content list', 'wp-proud-core'), $description ? $description : array('description' => __('List of content with a customizable display style', 'wp-proud-core')));
     // Set child class
     $this->child_class = !empty($child_class) ? $child_class : get_class($this);
     $this->post_type = false;
     // set filter for making sure teasers get rendered before filter
     add_filter('siteorigin_panels_before_content', array($this, 'pre_build_teasers'), 10, 2);
 }
 /**
  * OVERRIDE: Back-end widget form.
  *
  * @see WP_Widget::form()
  *
  * @param array $instance Previously saved values from database.
  */
 public function form($instance)
 {
     // $instance['image'] should be a media['ID'], but due to
     // https://github.com/proudcity/wp-proudcity/issues/436
     // Old values may be [featured-image]
     // Set new value 'featured_image' if that is the case
     if (!empty($instance['image']) && $instance['image'] === '[featured-image]') {
         $instance['featured_image'] = 'yes';
     }
     parent::form($instance);
 }
 public function enqueueFrontend()
 {
     $path = plugins_url('../includes/js/', __FILE__);
     // Running script
     wp_enqueue_script('proud-map-app', $path . 'proud-map-app.js', array('angular'), false, true);
     // Angular resources
     $path .= 'proud-map-app/dist/';
     // Not needed since moving map stuff to libraries
     // wp_enqueue_script('proud-map-app-libraries', $path . 'js/libraries.min.js', array('angular'), false, true);
     wp_enqueue_script('proud-map-app-app', $path . 'js/app.min.js', array('angular'), false, true);
     wp_enqueue_script('proud-map-app-templates', $path . 'views/app.templates.js', array('proud-map-app-app'), false, true);
     // CSS
     wp_enqueue_style('proud-map-app-css', $path . 'css/app.min.css');
     // Add global settings
     parent::addJsSettings(array('api_path' => get_option('proudcity_api', '/wp-json/wp/v2/locations/')), true);
 }
 public function enqueueFrontend()
 {
     $path = plugins_url('../includes/js/', __FILE__);
     // Running script
     wp_enqueue_script('proud-actions-app', $path . 'proud-actions-app.js', array('lodash', 'angular'), false, true);
     // Angular resources
     $path .= 'proud-actions-app/dist/';
     wp_enqueue_script('proud-actions-app-libraries', $path . 'js/libraries.min.js', array('angular'), false, true);
     wp_enqueue_script('proud-actions-app-app', $path . 'js/app.min.js', array('proud-actions-app-libraries'), false, true);
     wp_enqueue_script('proud-actions-app-templates', $path . 'views/app.templates.js', array('proud-actions-app-app'), false, true);
     wp_enqueue_script('google-maps-api', '//maps.googleapis.com/maps/api/js?key=' . get_option('google_api_key', '') . '&libraries=places');
     // @todo: make this work (file isn't getting included with this call, so I just added it to app.min.js)
     //if ($this->settings['active_tabs']['#options']['vote']) {
     //  wp_enqueue_script('proud-actions-app-vote', $path . 'js/vote.min.js', array('proud-actions-app-app'), false, true);
     //}
     // Add global settings
     parent::addJsSettings(array('api_path' => get_option('proudcity_api', '/wp-json/wp/v2/')), true);
 }
 function __construct()
 {
     parent::__construct('proud_document_embed', __('Embed Document', 'wp-proud-core'), array('description' => __("Select a document and embed a document preview", 'wp-proud-core')));
 }
 function __construct()
 {
     parent::__construct('proud_font_size', __('Font size dropdown', 'wp-proud-core'), array('description' => __('Allow users to increase/decrease font size', 'wp-proud-core')));
 }
Ejemplo n.º 7
0
 function __construct()
 {
     parent::__construct('powered_by_widget', __('Powered by text', 'wp-proud-core'), array('description' => __('Simple ProudCity message', 'wp-proud-core')));
 }
 function __construct()
 {
     parent::__construct('submenu', __('Submenu', 'wp-agency'), array('description' => __("Select a menu to display or, display a submenu from the Primary Menu", 'wp-agency')));
 }
 function __construct()
 {
     parent::__construct('proud_main_menu_list', __('Main menu list', 'wp-proud-core'), array('description' => __('Main menu in simple list', 'wp-proud-core')));
 }
 function __construct()
 {
     parent::__construct('proud_icon_link', __('Icon link', 'wp-proud-core'), array('description' => __('Simple icon button, and link', 'wp-proud-core')));
 }
 function __construct()
 {
     parent::__construct('proud_social_links', __('Social Links', 'wp-proud-core'), array('description' => __('Quick access links to social networks', 'wp-proud-core')));
 }
 function __construct()
 {
     parent::__construct('proud_share_links', __('Share dropdown', 'wp-proud-core'), array('description' => __('Quickly share the current page', 'wp-proud-core')));
 }
 function __construct()
 {
     parent::__construct('agency_menu', __('Agency menu', 'wp-agency'), array('description' => __("Display an agency menu", 'wp-agency')));
 }
Ejemplo n.º 14
0
 /**
  * Constructor
  *
  * @return  void
  */
 public function __construct()
 {
     parent::__construct('proud_icon_set', __('Icon set', 'wp-proud-core'), array('description' => __('A collection of icons and links', 'wp-proud-core')));
 }
 function __construct()
 {
     parent::__construct('agency_social', __('Agency social media', 'wp-agency'), array('description' => __("Display social media icons", 'wp-agency')));
 }
 function __construct()
 {
     parent::__construct('proud_actions_menu', __('Action menu list', 'wp-proud-actions-app'), array('description' => __('Displays list of action items', 'wp-proud-actions-app')));
 }
 function __construct()
 {
     parent::__construct('agency_hours', __('Agency hours', 'wp-agency'), array('description' => __("Display the agency's weekly hours", 'wp-agency')));
 }
 function __construct()
 {
     parent::__construct('agency_contact', __('Agency contact info', 'wp-agency'), array('description' => __("Display current agency's contact info", 'wp-agency')));
 }
 function __construct()
 {
     parent::__construct('proud_gravity_form', __('Form', 'wp-proud-core'), array('description' => __('Proud Gravity Forms Widget', 'wp-proud-core')));
 }
 function __construct()
 {
     parent::__construct('proudscore_widget', __('ProudScore Widget', 'wp-proud-core'), array('description' => __('Allow visitors to vote up a piece of content', 'wp-proud-core')));
 }
Ejemplo n.º 21
0
 function __construct()
 {
     parent::__construct('proud_logo', __('Footer logo', 'wp-proud-core'), array('description' => __('Footer logo and slogan', 'wp-proud-core')));
 }
 function __construct()
 {
     parent::__construct('proud_teaser_search', __('Content list search box', 'wp-proud-core'), array('description' => __('Adds a search box for a specific content list', 'wp-proud-core')));
 }
 function __construct()
 {
     parent::__construct('proud_google_translate', __('Google Translate dropdown', 'wp-proud-core'), array('description' => __('Google Translate dropdown select widget', 'wp-proud-core')));
 }
Ejemplo n.º 24
0
 function __construct()
 {
     parent::__construct('proud_search_box', __('Search Box', 'wp-proud-search'), array('description' => __('Autocomplete search', 'wp-proud-search')));
 }
 function __construct()
 {
     parent::__construct('contact_submenu', __('Contact submenu', 'wp-agency'), array('description' => __("Lists Agencies and Contact categories", 'wp-agency')));
 }
 function __construct()
 {
     parent::__construct('proud_contact_block', __('Contact Block', 'wp-proud-core'), array('description' => __('Simple contact info block', 'wp-proud-core')));
 }
 function __construct()
 {
     parent::__construct('proud_social_app', __('Social feed', 'wp-proud-social-app'), array('description' => __('Dynamic social media feed', 'wp-proud-social-app')));
 }
 function __construct()
 {
     parent::__construct('pagetitle', __('Page title', 'wp-proud'), array('description' => __("Display the page title", 'wp-proud')));
 }