'Options Framework', 'slug' => 'options-framework', 'required' => false, ), array( 'name' => 'Bootstrap 3 Shortcodes', 'slug' => 'bootstrap-3-shortcodes', 'required' => false, ), array( 'name' => 'Ketchup Shortcodes', 'slug' => 'ketchup-shortcodes-pack', 'required' => false, ) ); $config = array( 'default_path' => '', // Default absolute path to pre-packaged plugins. 'menu' => 'tgmpa-install-plugins', // Menu slug. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => false, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. 'strings' => array( 'page_title' => __( 'Install Required Plugins', 'business-card' ), 'menu_title' => __( 'Install Plugins', 'business-card' ), 'installing' => __( 'Installing Plugin: %s', 'business-card' ), // %s = plugin name. 'oops' => __( 'Something went wrong with the plugin API.', 'business-card' ), 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.','business-card' ), // %1$s = plugin name(s). 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.','business-card' ), // %1$s = plugin name(s). 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.','business-card' ), // %1$s = plugin name(s). 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.','business-card' ), // %1$s = plugin name(s). 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.','business-card' ), // %1$s = plugin name(s). 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.','business-card' ), // %1$s = plugin name(s). 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.','business-card' ), // %1$s = plugin name(s). 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.','business-card' ), // %1$s = plugin name(s). 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins','business-card' ), 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins','business-card' ), 'return' => __( 'Return to Required Plugins Installer', 'business-card' ), 'plugin_activated' => __( 'Plugin activated successfully.', 'business-card' ), 'complete' => __( 'All plugins installed and activated successfully. %s', 'business-card' ), // %s = dashboard link. 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'. ) ); tgmpa( $plugins, $config ); } /*** * THEME SETUP * ***/ function businesscard_theme_setup(){ // Set $content_width if (!isset( $content_width )) $content_width = 575; // Load Background $ketchupthemes_background_args = array( 'default-color' => 'ffffff', 'default-image' => get_template_directory_uri() . '/img/bg.png', 'wp-head-callback' => 'businesscard_custom_background_cb', ); add_theme_support( 'custom-background', $ketchupthemes_background_args ); add_editor_style( 'style.css' ); //Load Header $ketchupthemes_header_defaults = array( 'default-image' => '', 'random-default' => false, 'width' => '1920', 'height' => '450', 'flex-height' => false, 'flex-width' => false, 'default-text-color' => '', 'header-text' => false, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support('title-tag'); add_theme_support( 'custom-header', $ketchupthemes_header_defaults ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'post-thumbnails' ); register_nav_menu( 'primary', __('Main Menu','business-card') ); load_theme_textdomain('business-card', get_template_directory() . '/languages'); } add_action('after_setup_theme', 'businesscard_theme_setup'); function businesscard_custom_background_cb() { $background = set_url_scheme( get_background_image() ); $color = get_theme_mod( 'background_color', get_theme_support( 'custom-background', 'default-color' ) ); if ( ! $background && ! $color ) return; $style = $color ? "background-color: #$color;" : ''; if ( $background ) { $image = " background-image: url('$background');"; $repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ); if ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) ) $repeat = 'repeat'; $repeat = " background-repeat: $repeat;"; $position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ); if ( ! in_array( $position, array( 'center', 'right', 'left' ) ) ) $position = 'left'; $position = " background-position: top $position;"; $attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) ); if ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) ) $attachment = 'scroll'; $attachment = " background-attachment: $attachment;"; $style .= $image . $repeat . $position . $attachment; } ?> __('Menu', 'business-card') )); if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action('wp_enqueue_scripts', 'businesscard_load_scripts'); function businesscard_load_styles() { wp_enqueue_style( 'bootstrap', get_template_directory_uri(). '/css/bootstrap.min.css','','','all' ); wp_enqueue_style( 'bootstrap-theme', get_template_directory_uri().'/css/bootstrap-theme.min.css','','','all' ); wp_enqueue_style( 'slicknav',get_template_directory_uri().'/css/slicknav.css','','','all'); wp_enqueue_style( 'elegant-font',get_template_directory_uri().'/fonts/elegant_font/HTML_CSS/style.css','','','all'); wp_enqueue_style( 'style', get_stylesheet_uri(),'','','all' ); } add_action('wp_enqueue_scripts', 'businesscard_load_styles'); function businesscard_add_ie_html5_shim () { echo ''; } add_action('wp_head', 'businesscard_add_ie_html5_shim'); /*** * SIDEBARS INITIALIZATION * ***/ function businesscard_widgets_init() { register_sidebar(array( 'name' => __('Sidebar', 'business-card' ), 'id' => 'sidebar', 'description' => __('This is the widgetized sidebar.', 'business-card' ), 'before_widget' => '
', 'before_title' => '| ', ' | ';
switch ($field['type']) {
case 'text':
echo '', ' ', $field['desc']; break; case 'textarea': echo '', ' ', $field['desc']; break; case 'radio': foreach ($field['options'] as $option) { echo '',$option['name']; } break; case 'checkbox': echo ''; break; } echo ' | ', ' |
|---|