_constants(); $this->_hooks(); } protected function _constants() { // Plugin Version define( 'APT_PLUGIN_VER', '1.1.27' ); // Plugin Text Domain define( 'APT_TXTDM', 'abc-pricing-table' ); // Plugin Name define( 'APT_PLUGIN_NAME', __( 'Pricing', APT_TXTDM ) ); // Plugin Slug define( 'APT_PLUGIN_SLUG', 'abc-pricing' ); // Plugin Directory Path define( 'APT_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); // Plugin Directory URL define( 'APT_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); define( 'APT_SECURE_KEY', md5( NONCE_KEY ) ); } // end of constructor function protected function _hooks() { // Load text domain add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) ); // add testimonial menu item, change menu filter for multisite add_action( 'admin_menu', array( $this, 'pricing_menu' ), 101 ); // Create pricing table Custom Post add_action( 'init', array( $this, 'Pricing' ) ); // Add meta box to custom post add_action( 'add_meta_boxes', array( $this, 'admin_add_meta_box' ) ); // loaded during admin init add_action( 'admin_init', array( $this, 'admin_add_meta_box' ) ); add_action( 'save_post', array( &$this, '_apt_save_settings' ) ); // Shortcode Compatibility in Text Widgets add_action( 'widget_text', 'do_shortcode' ); // add pfg cpt shortcode column - manage_{$post_type}_posts_columns add_filter( 'manage_abc-pricing_posts_columns', array( &$this, 'set_abc_pricing_shortcode_column_name' ) ); // add pfg cpt shortcode column data - manage_{$post_type}_posts_custom_column add_action( 'manage_abc-pricing_posts_custom_column', array( &$this, 'custom_abc_pricing_shodrcode_data' ), 10, 2 ); } // end of hook function // end of hook function // Pricing table cpt shortcode column before date columns public function set_abc_pricing_shortcode_column_name( $defaults ) { $new = array(); $shortcode = $columns['abc_pricing_shortcode']; // save the tags column unset( $defaults['tags'] ); // remove it from the columns list foreach ( $defaults as $key => $value ) { if ( $key == 'date' ) { // when we find the date column $new['abc_pricing_shortcode'] = __( 'Shortcode', 'abc-pricing-table' ); // put the tags column before it } $new[ $key ] = $value; } return $new; } // abc cpt shortcode column data public function custom_abc_pricing_shodrcode_data( $column, $post_id ) { switch ( $column ) { case 'abc_pricing_shortcode': echo ""; echo ""; echo ""; echo ' "; break; } } public function load_textdomain() { load_plugin_textdomain( 'abc-pricing-table', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); } public function pricing_menu() { $plugins_help_menu = add_submenu_page( 'edit.php?post_type=' . APT_PLUGIN_SLUG, __( 'Our Plugins', 'abc-pricing-table' ), __( 'Our Plugins', 'abc-pricing-table' ), 'administrator', 'pricing-featured-plugins-page', array( $this, '_abcpt_featured_plugins' ) ); } public function Pricing() { $labels = array( 'name' => __( 'Pricing Table', 'post type general name', 'abc-pricing-table' ), 'singular_name' => __( 'Pricing Table', 'post type singular name', 'abc-pricing-table' ), 'menu_name' => __( 'Pricing Table', 'abc-pricing-table' ), 'name_admin_bar' => __( 'Pricing Table', 'add new on admin bar', 'abc-pricing-table' ), 'add_new' => __( 'Add Pricing Table', 'abc-pricing-table' ), 'add_new_item' => __( 'Add Pricing Table', 'abc-pricing-table' ), 'new_item' => __( 'New Pricing Table', 'abc-pricing-table' ), 'edit_item' => __( 'Edit Pricing Table', 'abc-pricing-table' ), 'view_item' => __( 'View Pricing Table', 'abc-pricing-table' ), 'all_items' => __( 'All Pricing Table', 'abc-pricing-table' ), 'search_items' => __( 'Search Pricing Table', 'abc-pricing-table' ), 'parent_item_colon' => __( 'Parent Pricing Table', 'abc-pricing-table' ), 'not_found' => __( 'No Pricing Table', 'abc-pricing-table' ), 'not_found_in_trash' => __( 'No Pricing Table found in Trash', 'abc-pricing-table' ), ); $args = array( 'labels' => __( 'Pricing Table', 'abc-pricing-table' ), 'description' => __( 'Description', 'abc-pricing-table' ), 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, // 'rewrite' => array( 'slug' => 'pricing' ), 'capability_type' => 'page', 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => 'dashicons-cart', 'menu_position' => null, 'supports' => array( 'title' ), ); register_post_type( 'abc-pricing', $args ); } public function admin_add_meta_box() { add_meta_box( __( 'Add Pricing Table', 'abc-pricing-table' ), __( 'Add Pricing Table', 'abc-pricing-table' ), array( &$this, 'apt_pricing_upload' ), 'abc-pricing', 'normal', 'default' ); add_meta_box( __( 'Upgrade Pricing Table Pro', 'abc-pricing-table' ), __( 'Upgrade Pricing Table Pro', 'abc-pricing-table' ), array( &$this, 'apt_upgrade_pro' ), 'abc-pricing', 'side', 'default' ); add_meta_box( __( 'Rate Our Plugin', 'abc-pricing-table' ), __( 'Rate Our Plugin', 'abc-pricing-table' ), array( &$this, 'apt_rate_plugin' ), 'abc-pricing', 'side', 'default' ); } /** meta upgrade pro **/ public function apt_upgrade_pro() { ?> Live Demo Upgrade Pro

If you like our plugin then please Rate us on WordPress


Please Rate Us
$featured_button, 'pricing_name' => $pricing_name, 'pricing_price' => $pricing_price, 'pricing_plan' => $pricing_plan, 'pricing_features' => $pricing_features, 'pricing_btn_text' => $pricing_btn_text, 'pricing_btn_url' => $pricing_btn_url, 'pricing_icon_pick' => $pricing_icon_pick, 'total_cols' => $total_cols, 'pricing_table_design' => $pricing_table_design, 'currency_icon' => $currency_icon, 'heading_text_color' => $heading_text_color, 'heading_background_color' => $heading_background_color, 'button_color' => $button_color, 'button_hover_color' => $button_hover_color, 'background_hover_color' => $background_hover_color, 'button_heading_color' => $button_heading_color, 'feature_heading_text_color' => $feature_heading_text_color, 'feature_button_color' => $feature_button_color, 'feature_heading_background_color' => $feature_heading_background_color, 'feature_button_heading_color' => $feature_button_heading_color, 'feature_background_hover_color' => $feature_background_hover_color, 'feature_button_hover_color' => $feature_button_hover_color, 'apt_custom_css' => $apt_custom_css, ); $apt_pricing_table_meta_key = 'apt_pricing_table_data_' . $post_id; update_post_meta( $post_id, $apt_pricing_table_meta_key, $pricing_post_settings ); } else { print 'Sorry, your nonce did not verify.'; exit; } }//// end save setting }//end _apt_save_settings() public function _abcpt_featured_plugins() { require_once 'featured-plugins/featured-plugins.php'; } } // register sf scripts function awplife_apt_register_scripts() { // css & JS wp_enqueue_script( 'jquery' ); wp_register_script( 'apt-bootstrap-min-js', plugin_dir_url( __FILE__ ) . 'assets/js/bootstrap.min.js' ); wp_register_style( 'apt-pricing-frontend-bootstrap-css', plugin_dir_url( __FILE__ ) . 'assets/css/pricing-frontend-bootstrap.css' ); wp_register_style( 'apt-all-css', plugin_dir_url( __FILE__ ) . 'assets/css/all.css' ); // css & JS } add_action( 'wp_enqueue_scripts', 'awplife_apt_register_scripts' ); // Plugin Recommend add_action( 'tgmpa_register', 'APT_TXTDM_plugin_recommend' ); function APT_TXTDM_plugin_recommend() { $plugins = array( array( 'name' => 'Portfolio Filter Gallery', 'slug' => 'portfolio-filter-gallery', 'required' => false, ), array( 'name' => 'Blog Filter & Post Portfolio', 'slug' => 'blog-filter', 'required' => false, ), array( 'name' => 'Team Builder Member Showcase', 'slug' => 'team-builder-member-showcase', 'required' => false, ), ); tgmpa( $plugins ); } $new_pricingtable_object = new apt_pricingtable(); require_once 'shotcode.php'; require_once 'class-tgm-plugin-activation.php'; } ?>