ID); return $content . $checkField; } // ACF Options if( function_exists('acf_add_options_page') ) { acf_add_options_page(array( 'page_title' => 'Company Details', 'icon_url' => 'dashicons-clipboard', //'position' => '10', //'page_title' => 'Home Page Sliders', //'menu_title' => 'Sliders', //'menu_slug' => 'home-page-sliders', //'capability' => 'edit_posts', )); acf_add_options_page(array( 'page_title' => 'Page CTA\'s', 'icon_url' => 'dashicons-megaphone', //'position' => '10', //'page_title' => 'Home Page Sliders', //'menu_title' => 'Sliders', //'menu_slug' => 'home-page-sliders', //'capability' => 'edit_posts', )); } // Excerpt Lengths class Excerpt { // Default length (by WordPress) public static $length = 55; // So you can call: my_excerpt('short'); public static $types = array( 'short' => 25, 'regular' => 55, 'long' => 100 ); /** * Sets the length for the excerpt, * then it adds the WP filter * And automatically calls the_excerpt(); * * @param string $new_length * @return void * @author Baylor Rae' */ public static function length($new_length = 55) { Excerpt::$length = $new_length; add_filter('excerpt_length', 'Excerpt::new_length'); Excerpt::output(); } // Tells WP the new length public static function new_length() { if( isset(Excerpt::$types[Excerpt::$length]) ) return Excerpt::$types[Excerpt::$length]; else return Excerpt::$length; } // Echoes out the excerpt public static function output() { the_excerpt(); } } // An alias to the class function my_excerpt($length = 55) { Excerpt::length($length); } // Replaces the excerpt "more" text by a link function new_excerpt_more($more) { global $post; return '... Read more '; } add_filter('excerpt_more', 'new_excerpt_more'); // Required for Google Analytics Dashboard and to Remove Dashboard Widgets add_action('admin_head', 'my_custom_fonts'); function my_custom_fonts() { echo ''; } function columns_screen_options() { add_screen_option( 'layout_columns', array( 'max' => 1, //Max number of columns 'default' => 1 //Default number of columns ) ); } add_action( 'admin_head-index.php', 'columns_screen_options' ); // Remove Dashboard Widgets add_action('admin_init', 'rw_remove_dashboard_widgets'); function rw_remove_dashboard_widgets() { remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); // right now remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // recent comments remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // incoming links remove_meta_box('dashboard_quick_press', 'dashboard', 'normal'); // quick press remove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal'); // recent drafts remove_meta_box('dashboard_primary', 'dashboard', 'normal'); // wordpress blog remove_meta_box('dashboard_secondary', 'dashboard', 'normal'); // other wordpress news remove_action('welcome_panel', 'wp_welcome_panel'); remove_meta_box( 'dashboard_activity', 'dashboard', 'normal'); } function image_quality() { return 100; } add_filter( 'jpeg_quality', 'image_quality' ); ?>