Skip to content

Instantly share code, notes, and snippets.

@cristianraiber
Created January 18, 2021 08:15
Show Gist options
  • Save cristianraiber/bb9ae4921d3a521fe305946c9d294c4c to your computer and use it in GitHub Desktop.
Save cristianraiber/bb9ae4921d3a521fe305946c9d294c4c to your computer and use it in GitHub Desktop.
Modula Whitelabel Config
/*
* The code below should be placed in your functions.php file, inside your (currently) active theme.
**/
/*
* The filter we use to provide Modula with our custom config aka the values we want to overwrite in Modula's backend.
* Note: the second parameter in add_filter has to be the same as the function name - as provided in the exampel below.
* To learn more about filters, visit this link: https://developer.wordpress.org/reference/functions/add_filter/
**/
add_filter( 'modula_whitelabel_config', 'whitelabel_advanced_config' );
function whitelabel_config() {
$config = array(
'gallery' => array(
'name' => 'Test Gallery',
'singular_name' => 'Galerry',
'all_items' => 'Galleries',
),
'albums' => array(
'name' => 'Test Album',
'singular_name' => 'Album Singular',
'all_items' => 'All Albumele',
),
'defaults_gallery' => array(
'name' => 'Default Galerry',
'singular_name' => 'Default Single Gallery',
'all_items' => 'All default galleries'
),
'defaults_album' => array(
'name' => 'Default Album',
'singular_name' => 'Default Album Singural',
'all_items' => 'All default Albums'
),
'logo' => MODULA_URL . 'assets/images/modula.png',
'logo_svg' => 'place the actual html of the svg here',
'feedback' => array(
'title' => 'Welcome',
'paragraph' => 'Whitelabel Plugin',
'link' => 'https://google.com',
),
'review' => array(
'notice' => 'Please review if you enjoy using.',
'rate' => 'Rate Now',
'rated' => 'Remind me later',
'no_rate' => "Don't show again",
'link' => 'https://google.com'
),
'documentation' => '<a href="https://modula.helpscoutdocs.com/" target="_blank" class="">' . esc_html__( 'Documentation', 'modula-best-grid-gallery' ) . '</a>',
'contact' => '<a href="https://modula.helpscoutdocs.com/" target="_blank" class="">' . esc_html__( 'Contact', 'modula-best-grid-gallery' ) . '</a>',
'beaver_block' => array(
'description' => 'Block Description',
'category' => 'Selected Category',
'section' => 'Select your Gallery',
),
);
return $config;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment