예제 #1
0
 public function get_forbidden_ids()
 {
     $phtpb_forbidden_ids = array();
     $page_for_posts = get_option('page_for_posts');
     if ($page_for_posts) {
         $phtpb_forbidden_ids[] = $page_for_posts;
     }
     if (class_exists('woocommerce')) {
         $woocommerce_pages = array('woocommerce_shop_page_id', 'woocommerce_cart_page_id', 'woocommerce_checkout_page_id', 'woocommerce_pay_page_id', 'woocommerce_thanks_page_id', 'woocommerce_myaccount_page_id', 'woocommerce_edit_address_page_id', 'woocommerce_view_order_page_id', 'woocommerce_terms_page_id');
         foreach ($woocommerce_pages as $woocommerce_page) {
             $wp_id = get_option($woocommerce_page);
             if ($wp_id) {
                 $phtpb_forbidden_ids[] = $wp_id;
             }
         }
     }
     self::$phtpb_forbidden_ids = apply_filters($this->plugin_name . '_forbidden_ids', $phtpb_forbidden_ids);
 }
예제 #2
0
/**
 * Begins execution of the plugin.
 *
 * Since everything within the plugin is registered via hooks,
 * then kicking off the plugin from this point in the file does
 * not affect the page life cycle.
 *
 * @since    1.0.0
 */
function run_phtpb()
{
    $plugin = new PeHaa_Themes_Page_Builder();
    $plugin->run();
}