Beispiel #1
0
function remove_onemozilla_options()
{
    remove_custom_background();
    remove_custom_image_header();
}
function remove_twentyeleven_options()
{
    $user = new WP_User(get_current_user_id());
    if (!empty($user->roles) && is_array($user->roles)) {
        foreach ($user->roles as $role) {
            $role = $role;
        }
    }
    if ($role == "editor") {
        remove_custom_background();
        remove_custom_image_header();
        remove_action('admin_menu', 'twentyeleven_theme_options_add_page');
    }
}
Beispiel #3
0
// Customize the footer in admin area
function remove_footer_admin()
{
    echo 'Theme developed by <a href="http://mediatemple.net" target="_blank">Media Temple</a> and powered by <a href="http://wordpress.org" target="_blank">WordPress</a>.';
}
add_filter('admin_footer_text', 'remove_footer_admin');
//Customize login screen
function custom_login()
{
    echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('template_directory') . '/custom-login/custom-login.css" />';
}
add_action('login_head', 'custom_login');
// This theme allows users to set a custom background.
add_theme_support('custom-background', apply_filters('twentyfourteen_custom_background_args', array('default-color' => '2d2d2d')));
require get_template_directory() . '/inc/customizer.php';
remove_custom_background();
add_action('init', 'register_cpt_project');
function register_cpt_project()
{
    $labels = array('name' => _x('Projects', 'project'), 'singular_name' => _x('Project', 'project'), 'add_new' => _x('Add New', 'project'), 'add_new_item' => _x('Add New Project', 'project'), 'edit_item' => _x('Edit Project', 'project'), 'new_item' => _x('New Project', 'project'), 'view_item' => _x('View Project', 'project'), 'search_items' => _x('Search Projects', 'project'), 'not_found' => _x('No projects found', 'project'), 'not_found_in_trash' => _x('No projects found in Trash', 'project'), 'parent_item_colon' => _x('Parent Project:', 'project'), 'menu_name' => _x('Projects', 'project'));
    $args = array('labels' => $labels, 'hierarchical' => false, 'description' => 'An image gallery ', 'supports' => array('title', 'thumbnail'), 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_nav_menus' => true, 'publicly_queryable' => true, 'exclude_from_search' => false, 'has_archive' => true, 'query_var' => true, 'can_export' => true, 'rewrite' => true, 'capability_type' => 'post');
    register_post_type('project', $args);
}
function my_attachments($attachments)
{
    $fields = array(array('name' => 'caption', 'type' => 'textarea', 'label' => __('Caption', 'attachments'), 'default' => 'caption'));
    $args = array('label' => 'Photos', 'post_type' => array('project'), 'position' => 'normal', 'priority' => 'high', 'filetype' => null, 'note' => 'Upload photos here.', 'append' => true, 'button_text' => __('Attach Photos', 'attachments'), 'modal_text' => __('Attach', 'attachments'), 'router' => 'browse', 'post_parent' => false, 'fields' => $fields);
    $attachments->register('my_attachments', $args);
    // unique instance name
}
add_action('attachments_register', 'my_attachments');
function remove_twentyeleven_options()
{
    remove_custom_background();
    //remove_custom_image_header();
}
Beispiel #5
0
function remove_twentythirteen_theme_options()
{
    remove_theme_support('post-formats');
    remove_custom_background();
    remove_custom_image_header();
}
Beispiel #6
0
function remove_onemozilla_options()
{
    remove_custom_background();
}
Beispiel #7
0
 /**
  * Removes the original WP Background manager menu and callback
  */
 protected function doRemoveWPBackground()
 {
     if (Helpers::checkWPVersion('3.4', '<')) {
         @remove_custom_background();
         // Since WP 3.1
     } else {
         // Since WP 3.4
         if (get_theme_support('custom-background')) {
             remove_theme_support('custom-background');
         }
     }
 }