Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.17.174.204
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/misswavenigeria.com/wp-content/plugins/ombre-features/cpt/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/misswavenigeria.com/wp-content/plugins/ombre-features/cpt/partners_cpt.php
<?php
function register_ombrepartners_posttype() {
    $labels = array(
        'name'              => esc_attr__( 'Partners', 'ombre' ),
        'singular_name'     => esc_attr__( 'partner box', 'ombre' ),
        'add_new'           => esc_attr__( 'Add new partner', 'ombre' ),
        'add_new_item'      => esc_attr__( 'Add new partner', 'ombre' ),
        'edit_item'         => esc_attr__( 'Edit partner', 'ombre' ),
        'new_item'          => esc_attr__( 'New partner', 'ombre' ),
        'view_item'         => esc_attr__( 'View partner', 'ombre' ),
        'search_items'      => esc_attr__( 'Search partners', 'ombre' ),
        'not_found'         => esc_attr__( 'No partner found', 'ombre' ),
        'not_found_in_trash'=> esc_attr__( 'No partner found in trash', 'ombre' ),
        'parent_item_colon' => esc_attr__( 'Parent partners:', 'ombre' ),
        'menu_name'         => esc_attr__( 'Partners', 'ombre' )
    );

    $taxonomies = array();
 
    $supports = array('title','thumbnail');
 
    $post_type_args = array(
        'labels'            => $labels,
        'singular_label'    => esc_attr__('Partner', 'ombre'),
        'public'            => true,
        'exclude_from_search' => true,
        'show_ui'           => true,
        'show_in_nav_menus' => false,
        'publicly_queryable'=> true,
        'query_var'         => true,
        'capability_type'   => 'post',
        'has_archive'       => false,
        'hierarchical'      => false,
        'rewrite'           => array( 'slug' => 'ombrepartners', 'with_front' => false ),
        'supports'          => $supports,
        'menu_position'     => 99,
        'menu_icon'         => 'dashicons-awards',
        'taxonomies'        => $taxonomies
    );
    register_post_type('ombrepartners',$post_type_args);
}
add_action('init', 'register_ombrepartners_posttype');

/*---------------------------------------------------
Add gallery thumbnail to the gallery list
----------------------------------------------------*/
add_filter('manage_edit-ombrepartners_columns', 'ombrepartners_id', 5);
add_action('manage_posts_custom_column', 'ombrepartners_custom_id', 5, 2);

function ombrepartners_id($defaults){
    $defaults['ombrepartners_thumb'] = '';
    return $defaults;
}
function ombrepartners_custom_id($column_name, $post_id){
    global $post;
    if($column_name === 'ombrepartners_thumb'){
        if ( has_post_thumbnail() ) {
            $thumb_id = get_post_thumbnail_id();
            $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'medium', true);
            $thumb_url = $thumb_url_array[0];
            echo '<div class="thumbhoverbig"><img src="' . esc_url($thumb_url) . '" alt="" /></div>';
        }
    }
}

// Link

function ombre_partnerlinkbox( $meta_boxes ) {
    $prefix = 'ombre'; // Prefix for all fields
    $meta_boxes['ombre_partnerlink'] = array(
        'id' => 'ombre_partnerlink',
        'title' => esc_attr__( 'Link (Optional)', 'ombre'),
        'object_types' => array('ombrepartners'), // post type
        'context' => 'normal', // normal or side
        'priority' => 'default', // default or high
        'show_names' => true, // Show field names on the left
        'fields' => array(
            array(
                'id' => $prefix . 'partnerlink',
                'name' => esc_attr__( 'Destination url:', 'ombre'),
                'desc' => esc_attr__( 'Correct link format; http://www.facebook.com', 'ombre'),
                'type' => 'text'
            ),
            array(
                'name' => esc_attr__( 'Open link in a new tab:', 'ombre'),
                'id'   => $prefix . 'partnerblank',
                'type' => 'checkbox'
            ),
        ),
    );

    return $meta_boxes;
}
add_filter( 'cmb2_meta_boxes', 'ombre_partnerlinkbox' );

// Image

function ombrepartners_image_box() {
    remove_meta_box( 'postimagediv', 'ombrepartners', 'side' );
    add_meta_box('postimagediv', esc_attr__('Logo (Required)', 'ombre'), 'post_thumbnail_meta_box', 'ombrepartners', 'normal', 'high');
}
add_action('do_meta_boxes', 'ombrepartners_image_box');
?>

Youez - 2016 - github.com/yon3zu
LinuXploit