Hidden Possibilities

Components

  • Use <Wrapper value={my_value} /> from src > front > js > components > Wrapper.jsx for insert HTML returns when you can't use dangerouslySetInnerHTML.

Scss/Sass/Css

  • You can use Sass instead of Scss by turn your .scss extension to .sass and by removing brackets.

  • Turn easly your pixel units to viewport units in your css by using:

    • vw|svw|lvw|dvw($value, $screen_dimension: 1920px)

    • vh|svh|lvh|dvh($value, $screen_dimension: 1080px)

PHP

Through your frontend or backend depending the case, you can use these custom PHP functions and hooks:

  • scg::field($field, $id = false, $format = true, $escape = false)

    • Call get_field() of ACF.

    • It'll check first in option before the current page if you don't set an ID.

  • Replace your return with str_replace() when you use ACF PHP functions or ACF REST API:

    add_action('acf/init', function(){
    
        StudioChampGauche\Utils\Field::replace([
            '{SITE_NAME}'
        ], [
            StudioChampGauche\SEO\SEO::site_name()
        ]);
    
    });

  • scg::cpt($post_type = 'post', $args = [])

    • You can pass the first parameter to null if you want pass post_type in $args

    • Set default parameters:

      StudioChampGauche\Utils\CustomPostType::default('posts_per_page', -1);
      StudioChampGauche\Utils\CustomPostType::default('paged', 1);

  • scg::source($args = [])

    • Get URL or absolute path.

    • $args parameters:

      • base Default value is /, equal to theme root.

      • path Path to your file

      • url Default value is false returning the absolute path. true if you want the url.

    • Set default parameters:

      StudioChampGauche\Utils\Source::default('base', '/');
      StudioChampGauche\Utils\Source::default('url', true);

From Admin Panel

  • You can clean Front End sources like wp_generator, WP Block Library, Classic Theme Styles, etc.

  • You can switch the appearance to have a panel containing only what you need.

  • You can activate/deactivate Gutenberg

  • You can activate/deactivate Editor for post and page post_type.

  • You can remove default dashboard elements

  • You can manage theme locations

  • You can accept SVG

  • You can stop create multiple resizes of an image you upload

Last updated