/** * Bootstraps the site * * @return void */ function digitalriver_ahoy() { // Filters attachements with the URL add_filter('wp_get_attachment_url', 'set_url_scheme'); // Adds functionality to enable shortcodes in text widget add_filter('widget_text', 'do_shortcode'); // Register custom option pages if (function_exists("register_options_page")) { register_options_page('Relationships'); } /* // Register the super navigation page if (function_exists('get_field')) { add_action('admin_menu', 'digitalriver_register_super_navigation_page'); }*/ // Add permissions to the editor role digitalriver_modify_editor_permissions(); }
* Option pages declared by Div Framework * * @author Div Truth * @category Framework/Options * @license GPL */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly /***************************** * Setup Custom Pages & Menus *****************************/ if (function_exists("register_options_page")) { register_options_page('Theme Settings'); register_options_page('Company Settings'); add_action('admin_menu', 'div_option_page_menus'); # Div Truth Options Menu } function div_option_page_menus() { $menu_label = get_field('div_menu_label', 'option') ? get_field('div_menu_label', 'option') : ' Options'; if (!file_exists(THEME_APPEARANCE_DIR . 'images/admin-logo.png')) { $menu_icon = THEME_APPEARANCE_URL . 'images/admin-logo.png'; } else { $menu_icon = DIV_APPEARANCE_URL . 'images/admin-logo.png'; } add_menu_page("<span class='DT_title'>" . $menu_label . "</span>", "<span class='DT_title'>Theme Options</span>", 'manage_options', 'admin.php?page=acf-options-theme-settings', "", $menu_icon, 4); add_submenu_page('admin.php?page=acf-options-theme-settings', __('Company Settings', 'theme-main'), __('Company Settings', 'theme-main'), 'manage_options', 'admin.php?page=acf-options-company-settings'); }
<?php function registriraj_menu() { register_nav_menu('header-menu', 'Header menu'); } add_action('init', 'registriraj_menu'); register_options_page('Global'); add_theme_support('post-thumbnails'); add_image_size('small-thumbnail', 400, 200, true); add_image_size('post-featured', 1000, 400, array('left', 'top')); function new_excerpt_more($more) { return '...'; } add_filter('excerpt_more', 'new_excerpt_more');
{ global $post; if (wp_attachment_is_image($post->ID)) { $url = $url . '#main'; } return $url; } add_filter('attachment_link', 'lgdcom_enhanced_image_navigation'); function codex_custom_init() { $labels = array('name' => _x('Events', 'post type general name'), 'singular_name' => _x('Event', 'post type singular name'), 'add_new' => _x('Add New', 'event'), 'add_new_item' => __('Add New Event'), 'edit_item' => __('Edit Event'), 'new_item' => __('New Event'), 'all_items' => __('All Event'), 'view_item' => __('View Event'), 'search_items' => __('Search Event'), 'not_found' => __('No Events found'), 'not_found_in_trash' => __('No Events found in Trash'), 'parent_item_colon' => '', 'menu_name' => __('Events')); $args = array('labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments')); register_post_type('events', $args); } add_action('init', 'codex_custom_init'); // remove junk from head remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'feed_links', 2); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'feed_links_extra', 3); remove_action('wp_head', 'start_post_rel_link', 10, 0); remove_action('wp_head', 'parent_post_rel_link', 10, 0); remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0); // Even or Odd posts $odd_or_even = 'odd'; // in functions.php file if (function_exists("register_options_page")) { register_options_page('Theme Options'); }