Exemplo n.º 1
0
     //"One page" tab
     if (!class_exists('WooCommerce') || !(class_exists('WooCommerce') && $post_id && $post_id == wc_get_page_id('shop'))) {
         $fields[6000] = array('type' => 'section-open', 'id' => 'page-one-section', 'title' => __('One page', 'mustang'), 'page' => array('templates' => array('page-template/one-page.php'), 'operand' => 'IS'));
         $fields[6020] = array('type' => 'html', 'content' => '<tr class="option padding-20"><td colspan="2"><div class="box blue">' . __('Use this page template to place most (or all) of your website content on a single page. Set the ID for each section of the page (apply on row shortcode) and use them in custom navigation as anchors. You can set a navigation for this page below. Once you click the navigation link, the page will scroll to the section of a specific anchor ID.', 'mustang') . '</div></td></tr>');
         $fields[6040] = array('type' => 'select', 'id' => 'navigation', 'label' => __('Anchor navigation', 'mustang'), 'description' => __('Set a special anchor navigation for this page', 'mustang'), 'options' => $helper['menus']);
         $fields[7000] = array('type' => 'section-close');
     }
     // /"One page" tab
     /**
      * For more form fields options please check the PHP files inside
      * the "wm-amplifier/includes/metabox/fields/" folder.
      */
     return $fields;
 }
 // /wm_page_metafields
 wma_add_meta_box(array('fields' => 'wm_page_metafields', 'id' => 'page-metabox', 'pages' => array('page'), 'title' => __('Page options', 'mustang')));
 /**
  * Staff metabox
  */
 /**
  * Staff metabox fields alteration
  *
  * @param   array $fields Array of predefined metafields
  * @param   array $fonticons Array of icons names/classes
  *
  * @return  array Modified $fields array
  */
 function wm_staff_contact_fields($fields = array(), $fonticons = array())
 {
     //Preparing output
     $fields = array();
Exemplo n.º 2
0
 */
if (!function_exists('wma_projects_cp_metafields')) {
    function wma_projects_cp_metafields()
    {
        //Helper variables
        $fields = array();
        //"Attributes" tab
        $fields[1000] = array('type' => 'section-open', 'id' => 'project-attributes-section', 'title' => _x('Attributes', 'Metabox section title.', 'webman-amplifier'));
        //Project custom link input field
        $fields[1020] = array('type' => 'text', 'id' => 'link', 'label' => __('Custom link URL', 'webman-amplifier'), 'description' => __('No link will be displayed / applied when left blank', 'webman-amplifier'));
        //Project custom link actions
        $fields[1040] = array('type' => 'select', 'id' => 'link-action', 'label' => __('Custom link action', 'webman-amplifier'), 'description' => __('Choose how to display / apply the link set above', 'webman-amplifier'), 'optgroups' => true, 'options' => array('1OPTGROUP' => __('Project page', 'webman-amplifier'), '' => __('Display link on project page', 'webman-amplifier'), '1/OPTGROUP' => '', '2OPTGROUP' => __('Apply directly in projects list', 'webman-amplifier'), 'modal' => __('Open in popup window (videos and images only)', 'webman-amplifier'), '_blank' => __('Open in new tab / window', 'webman-amplifier'), '_self' => __('Open in same window', 'webman-amplifier'), '2/OPTGROUP' => ''));
        $fields[1980] = array('type' => 'section-close');
        // /"Attributes" tab
        //Apply filter to manipulate with metafields array
        $fields = apply_filters('wmhook_wmamp_' . 'cp_metafields_' . 'wm_projects', $fields);
        //Sort the array by the keys
        ksort($fields);
        //Output
        return apply_filters('wmhook_wmamp_' . 'wma_projects_cp_metafields' . '_output', $fields);
    }
}
// /wma_projects_cp_metafields
/**
 * Create actual metabox
 *
 * @since  1.0
 */
if (function_exists('wma_add_meta_box')) {
    wma_add_meta_box(array('fields' => 'wma_projects_cp_metafields', 'id' => 'wm_projects' . '-metabox', 'pages' => array('wm_projects'), 'tabs' => true, 'title' => __('Project settings', 'webman-amplifier')));
}
Exemplo n.º 3
0
    function wma_logos_cp_metafields()
    {
        //Helper variables
        $fields = array();
        //"Attributes" tab
        $fields[1000] = array('type' => 'section-open', 'id' => 'logo-settings-section', 'title' => __('Logo settings', 'webman-amplifier'));
        //Logo image
        $fields[1020] = array('type' => 'html', 'content' => '<tr class="option padding-20"><td colspan="2"><div class="box blue"><a href="#" class="button-primary button-set-featured-image" style="margin-right: 1em">' . __('Set featured image', 'webman-amplifier') . '</a> ' . __('Set the logo image as the featured image of the post', 'webman-amplifier') . '</div></td></tr>');
        //Logo custom link input field
        $fields[1040] = array('type' => 'text', 'id' => 'link', 'label' => __('Custom link URL', 'webman-amplifier'), 'description' => __('No link will be displayed / applied when left blank', 'webman-amplifier'), 'validate' => 'url');
        //Logo custom link actions
        $fields[1060] = array('type' => 'select', 'id' => 'link-action', 'label' => __('Custom link action', 'webman-amplifier'), 'description' => __('Choose how to display / apply the link set above', 'webman-amplifier'), 'options' => array('_blank' => __('Open in new tab / window', 'webman-amplifier'), '_self' => __('Open in same window', 'webman-amplifier')));
        $fields[1980] = array('type' => 'section-close');
        // /"Attributes" tab
        //Apply filter to manipulate with metafields array
        $fields = apply_filters('wmhook_wmamp_' . 'cp_metafields_' . 'wm_logos', $fields);
        //Sort the array by the keys
        ksort($fields);
        //Output
        return apply_filters('wmhook_wmamp_' . 'wma_logos_cp_metafields' . '_output', $fields);
    }
}
// /wma_logos_cp_metafields
/**
 * Create actual metabox
 *
 * @since  1.0
 */
if (function_exists('wma_add_meta_box')) {
    wma_add_meta_box(array('fields' => 'wma_logos_cp_metafields', 'id' => 'wm_logos' . '-metabox', 'pages' => array('wm_logos'), 'tabs' => false, 'title' => __('Logo settings', 'webman-amplifier'), 'visual-wrapper' => false));
}
Exemplo n.º 4
0
        //Helper variables
        $fields = array();
        //"Author" tab
        $fields[1000] = array('type' => 'section-open', 'id' => 'testimonial-author-section', 'title' => _x('Author', 'Metabox section title.', 'webman-amplifier'));
        //Testimonial image
        $fields[1020] = array('type' => 'html', 'content' => '<tr class="option padding-20"><td colspan="2"><div class="box blue"><a href="#" class="button-primary button-set-featured-image" style="margin-right: 1em">' . __('Set featured image', 'webman-amplifier') . '</a> ' . __('You can set the testimonial author photo or logo as post featured image', 'webman-amplifier') . '</div></td></tr>');
        //Testimonial author input field
        $fields[1040] = array('type' => 'text', 'id' => 'author', 'label' => __('Testimonial author', 'webman-amplifier'), 'description' => __('Set the testimonial author name here', 'webman-amplifier'));
        //Testimonial custom link input field
        $fields[1060] = array('type' => 'text', 'id' => 'link', 'label' => __('Custom link URL', 'webman-amplifier'), 'description' => __('No link will be displayed / applied when left blank', 'webman-amplifier'), 'validate' => 'url');
        //Testimonial custom link actions
        $fields[1080] = array('type' => 'select', 'id' => 'link-action', 'label' => __('Custom link action', 'webman-amplifier'), 'description' => __('Choose how to display / apply the link set above', 'webman-amplifier'), 'options' => array('_blank' => __('Open in new tab / window', 'webman-amplifier'), '_self' => __('Open in same window', 'webman-amplifier')));
        $fields[1980] = array('type' => 'section-close');
        // /"Author" tab
        //Apply filter to manipulate with metafields array
        $fields = apply_filters('wmhook_wmamp_' . 'cp_metafields_' . 'wm_testimonials', $fields);
        //Sort the array by the keys
        ksort($fields);
        //Output
        return apply_filters('wmhook_wmamp_' . 'wma_testimonials_cp_metafields' . '_output', $fields);
    }
}
// /wma_testimonials_cp_metafields
/**
 * Create actual metabox
 *
 * @since  1.0
 */
if (function_exists('wma_add_meta_box')) {
    wma_add_meta_box(array('fields' => 'wma_testimonials_cp_metafields', 'id' => 'wm_testimonials' . '-metabox', 'pages' => array('wm_testimonials'), 'tabs' => true, 'title' => __('Testimonial settings', 'webman-amplifier')));
}
Exemplo n.º 5
0
        // /"Info" tab
        //"Contacts" tab
        $fields[3000] = array('type' => 'section-open', 'id' => 'staff-contacts-section', 'title' => _x('Contacts', 'Metabox section title.', 'webman-amplifier'));
        //Staff custom contacts
        $contact_fields = array();
        if (!empty($fonticons)) {
            $contact_fields[] = array('type' => 'select', 'id' => 'icon', 'label' => __('Icon', 'webman-amplifier'), 'options' => $fonticons);
        }
        $contact_fields[] = array('type' => 'text', 'id' => 'title', 'label' => __('Title', 'webman-amplifier'));
        $contact_fields[] = array('type' => 'textarea', 'id' => 'content', 'label' => __('HTML content', 'webman-amplifier'));
        $contact_fields = apply_filters('wmhook_wmamp_' . 'cp_metafields_' . 'wm_staff' . '_contact_fields', $contact_fields, $fonticons);
        $fields[3020] = array('type' => 'repeater', 'id' => 'contacts', 'label' => __('Staff contacts', 'webman-amplifier'), 'fields' => $contact_fields);
        $fields[3980] = array('type' => 'section-close');
        // /"Contacts" tab
        //Apply filter to manipulate with metafields array
        $fields = apply_filters('wmhook_wmamp_' . 'cp_metafields_' . 'wm_staff', $fields);
        //Sort the array by the keys
        ksort($fields);
        //Output
        return apply_filters('wmhook_wmamp_' . 'wma_staff_cp_metafields' . '_output', $fields);
    }
}
// /wma_staff_cp_metafields
/**
 * Create actual metabox
 *
 * @since  1.0
 */
if (function_exists('wma_add_meta_box')) {
    wma_add_meta_box(array('fields' => 'wma_staff_cp_metafields', 'id' => 'wm_staff' . '-metabox', 'pages' => array('wm_staff'), 'tabs' => true, 'title' => __('Staff settings', 'webman-amplifier')));
}