plugin_init(); } return $instance; } /** * Initialize the plugin * * @return void */ public function plugin_init() { add_action('admin_menu', array($this, 'admin_menu')); add_action('admin_init', array($this, 'register_settings')); add_action('wp_footer', array($this, 'register_function')); } /** * * * @return */ public function admin_menu() { add_menu_page(__('Aggregate Rating', 'aggregate-rating'), __('Aggregate Rating', 'aggregate-rating'), 'manage_options', 'aggregate-rating', array($this, 'aggregate_rating_cb_func'), 'dashicons-heart', 6); } /** * * * @return */ public function get_d_val($op, $dop, $slug) { if (null !== get_option($op)) { if (isset(get_option($op)[$slug]) && get_option($op)[$slug]) { return get_option($op)[$slug]; } } return get_option($dop) ? get_option($dop) : ''; } /** * * * @return */ public function is_act_sl($slug) { if (null !== get_option('ps_aggr_slug_act')) { if (isset(get_option('ps_aggr_slug_act')[$slug]) && get_option('ps_aggr_slug_act')[$slug]) { return true; } } return false; } /** * * * @return */ public function aggregate_rating_cb_func() { ?>

Aggregate Rating


Basic Info
Business / Company Name *
Street Address *
Address Locality *
Address Region *
Phone *
Logo Url *
Rating * Rating * - Scale * - Votes * -
Price Range


Pages array('post', 'page'), 'posts_per_page' => -1)); ?> posts) { foreach ($query->posts as $key => $post) { ?>
Page slug * is_act_sl($post->post_name) ? 'checked' : ''; ?> /> Check to Disable
Business / Company Name *
Street Address *
Address Locality *
Address Region *
Phone *
Logo Url *
Rating * Rating * - Scale * - Votes * -
Price Range
post_name; if (!$this->is_act_sl($slug)) { $company_name = $this->get_d_val('ps_aggr_company_name', 'aggr_company_name', $slug); $street_address = $this->get_d_val('ps_aggr_street_address', 'aggr_street_address', $slug); $address_locality = $this->get_d_val('ps_aggr_address_locality', 'aggr_address_locality', $slug); $address_region = $this->get_d_val('ps_aggr_address_region', 'aggr_address_region', $slug); $phone = $this->get_d_val('ps_aggr_phone', 'aggr_phone', $slug); $logo_url = $this->get_d_val('ps_aggr_logo_url', 'aggr_logo_url', $slug); $rating_count = $this->get_d_val('ps_rating_count', 'rating_count', $slug); $rating_scale = $this->get_d_val('ps_rating_scale', 'rating_scale', $slug); $rating_votes = $this->get_d_val('ps_rating_votes', 'rating_votes', $slug); $price_range = $this->get_d_val('ps_price_range', 'price_range', $slug); ?>
118GROUP
Rated / based on customer reviews
,
Phone: