PHP code example of frc / wp-base

1. Go to this page and download the library: Download frc/wp-base library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

frc / wp-base example snippets


// Theme
add_theme_support('frc-base-theme-clean-up');
add_theme_support('frc-base-theme-disable-api');
add_theme_support('frc-base-theme-disable-asset-versioning');
add_theme_support('frc-base-theme-disable-rest-api', [
    'disabled' => ['/'],
]);
add_theme_support('frc-base-theme-disable-trackbacks');

// Admin
add_theme_support('frc-base-admin-clean-up');
add_theme_support('frc-base-admin-defaults-tinymc');
add_theme_support('frc-base-admin-disable-update-checks');

// Plugins
add_theme_support('frc-base-plugin-all');

add_theme_support('frc-base-theme-all'); // Activate all plugin modules

add_theme_support('!frc-base-plugin-woocommerce');  // Disable WooCommerce plugin module

add_theme_support('frc-base-theme-disable-rest-api', [
    'disabled' => ['/'], // Disable all routes
    // or
    'disabled' => ['users', 'posts'], // Disable user & post routes

    'allowed' => ['posts'], // If all routes has been disabled but allow 'posts' route
    
    // super admin / admins have access to all routes always, other logged in users can be limited as follows
    'authenticated' => [
         'disabled' => ['/'],
         'allowed' => ['posts'],
     ]
    
]);