Пример #1
0
function pl_theme_options_slug()
{
    if (pl_theme_info('template') != 'dms') {
        return pl_base_options_slug() . '-' . pl_theme_info('template');
    } else {
        return pl_base_options_slug();
    }
}
Пример #2
0
 function run_installation_routine($url = '')
 {
     $settings = pl_get_global_settings();
     // Only sets defaults if they are null
     set_default_settings();
     if (!$settings) {
         $this->load_page_templates();
         $this->apply_page_templates();
         // Publish New Templates
         $tpl_handler = new PLCustomTemplates();
         $tpl_handler->update_objects('publish');
     }
     // Add Templates
     $id = $this->page_on_activation();
     // Redirect
     $url = add_query_arg('pl-installed-theme', pl_theme_info('template'), get_permalink($id));
     return $url;
 }
Пример #3
0
 function run_installation_routine($url = '')
 {
     set_theme_mod('pl_installed', true);
     $settings = pl_get_global_settings();
     // Only sets defaults if they are null
     set_default_settings();
     if (is_file(trailingslashit(get_stylesheet_directory()) . 'pl-config.json')) {
         $settings_handler = new PageLinesSettings();
         $settings_handler->import_from_child();
     }
     $this->apply_page_templates();
     // Publish New Templates
     $tpl_handler = new PLCustomTemplates();
     $tpl_handler->update_objects('publish');
     // Add Templates
     $id = $this->page_on_activation();
     // Redirect
     $url = add_query_arg('pl-installed-theme', pl_theme_info('template'), get_permalink($id));
     return $url;
 }