__( 'Primary Menu', 'athenea' ), ) ); // Enable support for Post Formats. //add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); // Setup the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'athenea_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); } endif; // athenea_setup add_action( 'after_setup_theme', 'athenea_setup' ); /** * Register widgetized area and update sidebar with default widgets. */ function athenea_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'athenea' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); // Footer A register_sidebar( array( 'name' => __( 'Footer A', 'athenea' ), 'id' => 'sidebar-6', 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', )); // Footer B register_sidebar( array( 'name' => __( 'Footer B', 'athenea' ), 'id' => 'sidebar-7', 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', )); // Footer C register_sidebar( array( 'name' => __( 'Footer C', 'athenea' ), 'id' => 'sidebar-8', 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', )); // Footer C register_sidebar( array( 'name' => __( 'Footer D', 'athenea' ), 'id' => 'sidebar-9', 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', )); } add_action( 'widgets_init', 'athenea_widgets_init' ); /** * Enqueue scripts and styles. */ function athenea_scripts() { wp_enqueue_script( 'jquery'); wp_enqueue_style( 'athenea-style', get_stylesheet_uri() ); wp_enqueue_script( 'athenea-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); wp_enqueue_script( 'athenea-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); wp_register_script('bootstrap', get_template_directory_uri().'/inc/dist/js/bootstrap.min.js', false, '3.0.3', true, array('all')); wp_enqueue_script('bootstrap'); wp_register_style('bootstrap', get_template_directory_uri().'/inc/dist/css/bootstrap.min.css', false, '3.0.3', false, array('all')); wp_enqueue_style('bootstrap'); wp_register_script('athenea-menu', get_template_directory_uri().'/js/athenea.js', false, '3.0.3', false, array('all')); wp_enqueue_script('athenea-menu'); wp_register_style('genericons', get_template_directory_uri().'/inc/dist/genericons/genericons.css', false, '3.0.3', false, array('all')); wp_enqueue_style('genericons'); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } /** Cambio de design */ if ( !is_admin() ) { if ( of_get_option('unique_design', 'design-red' ) == 'design-red' ) { wp_enqueue_style( 'athenea-red', get_template_directory_uri() . '/inc/dist/css/athenea-red-min.css' ); wp_enqueue_style('athenea-red'); } else { wp_enqueue_style( 'athenea-blue', get_template_directory_uri() . '/inc/dist/css/athenea-blue-min.css' ); wp_enqueue_style('athenea-blue'); } } } add_action( 'wp_enqueue_scripts', 'athenea_scripts' ); /** * Filters comments_form() default arguments * * @author IBERMEGA digital * @since 1.7.0 - 16.06.2012 * * @param array $defaults * * @return array */ function athenea_comment_form_defaults( $defaults ) { return wp_parse_args( array( 'comment_field' => '
', 'comment_notes_before' => '', 'comment_notes_after' => '
' . allowed_tags() . '
' ) . '
', 'title_reply' => '' . __( 'Leave a reply', 'athenea' ) . '', 'title_reply_to' => '' . __( 'Leave a reply to %s', 'athenea' ). '', 'must_log_in' => '
' . sprintf( __( 'You must be logged in to post a comment.', 'athenea' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( get_the_ID() ) ) ) ) . '
', 'logged_in_as' => '
' . sprintf( __( 'Logged in as %2$s. Log out?', 'athenea' ), admin_url( 'profile.php' ), wp_get_current_user()->display_name, wp_logout_url( apply_filters( 'the_permalink', get_permalink( get_the_ID() ) ) ) ) . '
', ), $defaults ); } add_filter( 'comment_form_defaults', 'athenea_comment_form_defaults' ); if ( ! function_exists( 'athenea_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own athenea_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * * @author IBERMEGA digital * @since 1.0.0 - 10.10.2013 * * @param object $comment Comment data object. * @param array $args * @param int $depth Depth of comment in reference to parents. * * @return void */ function athenea_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; if ( 'pingback' == $comment->comment_type OR 'trackback' == $comment->comment_type ) : ?>
  • >

     ', '' ); ?>

  • >
    ">

    said on %2$s:', 'athenea' ), sprintf( '%s', get_comment_author_link() ), sprintf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', 'athenea' ), get_comment_date(), get_comment_time() ) ) ); edit_comment_link( __( 'Edit', 'athenea' ), ' ', '' ); ?>

    comment_approved ) : ?>
    __( 'Reply ', 'athenea' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    '; } add_action( 'comment_form_top', 'athenea_comment_form_top' ); /** * Adds markup to the comment form which is needed to make it work with Bootstrap * needs * * @author IBERMEGA digital * @since 1.0.0 - 10.10.2013 * * @param string $html * * @return string */ function athenea_comment_form() { echo '
  • '; } add_action( 'comment_form', 'athenea_comment_form' ); /** * Custom author form field for the comments form * * @author IBERMEGA digital * @since 1.0.0 - 10.10.2013 * * @param string $html * * @return string */ function athenea_comment_form_field_author( $html ) { $commenter = wp_get_current_commenter(); $req = get_option( 'require_name_email' ); $aria_req = ( $req ? " aria-required='true'" : '' ); return '
    ' . ( $req ? '

    ' . __('required', 'athenea') . '

    ' : '' ) . '
    '; } add_filter( 'comment_form_field_author', 'athenea_comment_form_field_author'); /** * Custom HTML5 email form field for the comments form * * @author IBERMEGA digital * @since 1.0.0 - 10.10.2013 * * @param string $html * * @return string */ function athenea_comment_form_field_email( $html ) { $commenter = wp_get_current_commenter(); $req = get_option( 'require_name_email' ); $aria_req = ( $req ? " aria-required='true'" : '' ); return '

    ' . ( $req ? '' . __('required', 'athenea') . ', ' : '' ) . __( 'will not be published', 'athenea' ) . '

    '; } add_filter( 'comment_form_field_email', 'athenea_comment_form_field_email'); /** * Custom HTML5 url form field for the comments form * * @author IBERMEGA digital * @since 1.0.0 - 10.10.2013 * * @param string $html * * @return string */ function athenea_comment_form_field_url( $html ) { $commenter = wp_get_current_commenter(); return '
    '; } add_filter( 'comment_form_field_url', 'athenea_comment_form_field_url'); /** * Adds IE specific scripts * * Respond.js has to be loaded after Theme styles * * @author IBERMEGA digital * @since 1.7.0 - 11.06.2012 * * @return void */ function athenea_print_ie_scripts() { ?> ID; $message_check_id = $message_page ->ID; //Formulario $form_page = array( 'post_type' => 'page', 'post_name' => 'form-contact', 'post_title' => 'Form Contact', 'post_content' => '[iberthemeform]', 'post_status' => 'publish', 'post_author' => 1, 'comment_status' => 'closed', 'ping_status' => 'closed', 'menu_order' => 77, 'post_category' => array(1), ); //Recibido $message_page = array( 'post_type' => 'page', 'post_name' => 'message-received', 'post_title' => 'Message Received', 'post_content' => __( '

    Message Received

    Thank you for contacting us.

    Our systems are processing your message and reply you as soon as possible.

    Thanks for your attention
    ', 'athenea' ), 'post_status' => 'publish', 'post_author' => 1, 'comment_status' => 'closed', 'ping_status' => 'closed', 'menu_order' => 78, 'post_category' => array(1), ); if(!isset($form_check_id)){ wp_insert_post($form_page); $form_page_data = get_page_by_title('Form Contact'); $form_page_id = $form_page_data ->ID; update_post_meta($form_page_id, '_wp_page_template','dashboard.php'); } if(!isset($message_check_id)){ wp_insert_post($message_page); $message_page_data = get_page_by_title('Message Received'); $message_page_id = $message_page_data ->ID; update_post_meta($message_page_id, '_wp_page_template','dashboard.php'); } /** * Add optionsframework */ if ( !function_exists( 'optionsframework_init' ) ) { define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/inc/' ); require_once dirname( __FILE__ ) . '/inc/options-framework.php'; } add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts'); function optionsframework_custom_scripts() { ?>