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 : 18.191.14.104
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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/misswavenigeria.com/wp-content/plugins/ombre-features/ombre-features.php
<?php
/**
 * Plugin Name: Ombre Features
 * Plugin URI: http://themeforest.net/item/ombre-model-agency-fashion-wordpress-theme/14997818?ref=egemenerd
 * Description: Ombre custom post types, widgets, shortcodes
 * Version: 3.4
 * Author: Egemenerd
 * Author URI: http://themeforest.net/user/egemenerd?ref=egemenerd
 * License: http://themeforest.net/licenses?ref=egemenerd
 */

/*---------------------------------------------------
Custom Image Sizes
----------------------------------------------------*/

add_image_size( 'ombre-square', 600, 600, array( 'center', 'top' ));
add_filter('image_size_names_choose', 'ombrecpt_image_sizes');

if ( ! function_exists( 'ombrecpt_image_sizes' ) ) {
function ombrecpt_image_sizes($sizes) {
    $addsizes = array(
        "ombre-square" => esc_attr__( 'Square Thumbnail', 'ombre')
    );
    $newsizes = array_merge($sizes, $addsizes);
    return $newsizes;
}
}

/* Register Scripts */

function ombrecpt_scripts(){
    wp_enqueue_style('lightgallery', plugin_dir_url( __FILE__ ) . 'css/lightgallery.css', true, '1.0');
    wp_enqueue_style('owl', plugin_dir_url( __FILE__ ) . 'css/owl.css', true, '1.0');
    wp_enqueue_style('colorbox', plugin_dir_url( __FILE__ ) . 'css/colorbox.css', true, '1.0');
    if (( is_page_template('homepage.php')) || ( is_page_template('homeblogtwo.php')) || ( is_page_template('homeblogthree.php')) || ( is_page_template('homeblogsidebar.php'))) { 
        wp_enqueue_style('nerveslider', plugin_dir_url( __FILE__ ) . 'css/nerveslider.css', true, '1.0');
        wp_register_script('nerveslider-js', plugin_dir_url( __FILE__ ) .'js/nerveslider.js', array( 'jquery' ), '1.0.0', true );
        wp_enqueue_script('jquery-ui-core');
        wp_enqueue_script('jquery-ui-draggable');
        wp_enqueue_script('jquery-ui-droppable');
        wp_enqueue_script('jquery-effects-core');
        wp_enqueue_script('nerveslider-js');
    }
    wp_enqueue_style('ombrecpt-styles', plugin_dir_url( __FILE__ ) . 'css/style.css', true, '1.0');
    if ( is_rtl() ) {
        wp_enqueue_style('ombrecpt-rtl-styles', plugin_dir_url( __FILE__ ) . 'css/rtl.css', true, '1.0');
    }
    wp_enqueue_script('owl-js',plugin_dir_url( __FILE__ ).'js/owl.js', array( 'jquery' ), '1.0.0', true );
    wp_enqueue_script('ombre-tabs',plugin_dir_url( __FILE__ ).'js/tabs.js', array( 'jquery' ), '1.0.0', true );
    wp_enqueue_script('lightgallery-js',plugin_dir_url( __FILE__ ).'js/lightgallery.js', array( 'jquery' ), '1.0.0', true );
    wp_enqueue_script('ombre-accordion',plugin_dir_url( __FILE__ ).'js/accordion.js', array( 'jquery' ), '1.0.0', true );
    wp_enqueue_script('colorbox-js',plugin_dir_url( __FILE__ ).'js/colorbox.js', array( 'jquery' ), '1.0.0', true );
}
add_action('wp_enqueue_scripts','ombrecpt_scripts', 99, 1);

function ombreshc_css() {
	wp_enqueue_style('ombreshc-adminstyle', plugins_url('css/admin.css', __FILE__));
    wp_enqueue_script('dv_panel_script', plugin_dir_url( __FILE__ ) . 'js/admin.js','','',true);
}

add_action('admin_enqueue_scripts', 'ombreshc_css');

/*---------------------------------------------------
Home Slider Script
----------------------------------------------------*/

function ombre_slider_script() { 
        $autoplay = get_option('ombre_sliderautoplay');
        $autoplayspeed = get_option('ombre_sliderautoplayspeed');
        $slidetransition = get_option('ombre_slidetransition');
        $scalemode = get_option('ombre_scalemode');
?>
<script type="text/javascript">   
jQuery(document).ready(function () {
    "use strict";
    if ( jQuery.isFunction(jQuery.fn.nerveSlider) ) {
    jQuery("body").find('#home-slider').fadeIn();
    jQuery("#home-slider").nerveSlider({
        sliderAutoPlay: <?php if ($autoplay == "true") { echo esc_js('false'); } else { echo esc_js('true'); } ?>,
        slideTransitionDelay: <?php if (!empty($autoplayspeed)) { echo esc_js($autoplayspeed); } else { echo esc_js('5'); } ?>000,
        sliderWidth: "100%",
        sliderHeight: "100%",
        sliderHeightAdaptable: false,
        slidesDraggable: false,
        allowKeyboardEvents: false,
        slideImageScaleMode: "<?php if (!empty($scalemode)) { echo esc_js($scalemode); } else { echo esc_js('fill'); } ?>",
        sliderResizable: true,
        sliderKeepAspectRatio: false,
        slideTransition: "<?php if (is_rtl()) { echo esc_js('fade'); } else { if (!empty($slidetransition)) { echo esc_js($slidetransition); } else { echo esc_js('slide'); }} ?>",
        slideTransitionSpeed: 1200,
        slideTransitionEasing: "easeOutQuint",
        showDots: false,
        waitForLoad: true,
        slideTransitionStart: function () {
            jQuery('.ns_slideContent').find('div').fadeOut(100);
            jQuery('.ns_slideContent').find('div h1').toggleClass();
            jQuery('.ns_slideContent').find('div p').toggleClass();
            if (jQuery(window).width() > 1024) {
                setTimeout(function () {
                    jQuery('#home-slider').find('img').removeClass('image-zoom scale-left scale-right scale-up scale-down');
                }, 1000);
            }
        },
        slideTransitionComplete: function () {
            jQuery("#home-slider").data("selectedSlide").find('.ns_slideContent div').fadeIn();
            jQuery('.ns_slideContent').find('div h1').toggleClass();
            jQuery('.ns_slideContent').find('div p').toggleClass();
            if (jQuery(window).width() > 1024) {
                var imgAnimation = jQuery("#home-slider").data("selectedSlide").find("img").data("animation");
                jQuery("#home-slider").data("selectedSlide").find("img").addClass(imgAnimation);
            }
        }
    });
    };
    });    
</script>
<?php }

/*---------------------------------------------------
Tinymce custom button
----------------------------------------------------*/

if ( ! function_exists( 'ombreshortcodes_add_button' ) ) {
add_action('init', 'ombreshortcodes_add_button');  
function ombreshortcodes_add_button() {  
   if ( current_user_can('edit_posts') &&  current_user_can('edit_pages') )  
   {  
     add_filter('mce_external_plugins', 'ombre_add_plugin', 99);  
     add_filter('mce_buttons', 'ombre_register_button', 99);  
   }  
} 
}

if ( ! function_exists( 'ombre_register_button' ) ) {
function ombre_register_button($buttons) {
    array_push($buttons, "ombre_mce_button");
    return $buttons;  
}  
}

if ( ! function_exists( 'ombre_add_plugin' ) ) {
function ombre_add_plugin($plugin_array) {
    $plugin_array['ombre_mce_button'] = plugin_dir_url( __FILE__ ) . 'js/shortcodes.js';
    return $plugin_array;  
}
}

/*---------------------------------------------------
Custom taxonomy field (image url)
----------------------------------------------------*/

add_action( 'category_add_form_fields', 'ombre_category_add_fields', 10, 2 );
add_action( 'category_edit_form_fields', 'ombre_category_edit_fields', 10, 2 );

// Edit category screen

function ombre_category_edit_fields($tag) { 
    if ( ! did_action( 'wp_enqueue_media' ) ){
        wp_enqueue_media();
    } 
    $t_id = $tag->term_id;
    $term_meta = get_option( "category_gallerycatimage_$t_id" );
?>  
   
<tr class="form-field">
    <th scope="row"> 
        <label for="gallerycatimage_id"><?php esc_attr_e('Header Image (Optional)', 'ombre'); ?></label>  
    </th>
    <td>
        <input type="text" name="gallerycatimage" id="gallerycatimage" value="<?php if (!empty($term_meta)) { esc_attr_e($term_meta); } ?>" />
        <br/><input id="gallerycatimage_image_button" class="button" type="button" value="<?php esc_attr_e( 'Upload Image', 'ombre') ?>" />
        <script type="text/javascript">jQuery(document).ready(function(e){var t;e("#gallerycatimage_image_button").click(function(a){return a.preventDefault(),t?void t.open():(t=wp.media.frames.file_frame=wp.media({title:"Choose Image",button:{text:"Choose Image"},multiple:!1}),t.on("select",function(){attachment=t.state().get("selection").first().toJSON(),e("#gallerycatimage").val(attachment.url)}),void t.open())})});</script>
    </td>
</tr>  
   
<?php                
}

// Add category screen

function ombre_category_add_fields($tag) {  
    if ( ! did_action( 'wp_enqueue_media' ) ){
        wp_enqueue_media();
    } 
    $t_id = isset($tag->term_id); 
    $term_meta = get_option( "category_gallerycatimage_$t_id" );
?>  
   
<div class="form-field" style="margin-bottom:30px;">
    <label for="gallerycatimage_id"><?php esc_attr_e('Header Image (Optional)', 'ombre'); ?></label>  
    <input type="text" name="gallerycatimage" id="gallerycatimage" value="<?php if (!empty($term_meta)) { esc_attr_e($term_meta); } ?>" />
    <p><?php esc_attr_e( 'This image will be displayed as a header image on category page.', 'ombre') ?></p>
    <input id="gallerycatimage_image_button" class="button" type="button" value="<?php esc_attr_e( 'Upload Image', 'ombre') ?>" />
</div> 
<script type="text/javascript">jQuery(document).ready(function(e){var t;e("#gallerycatimage_image_button").click(function(a){return a.preventDefault(),t?void t.open():(t=wp.media.frames.file_frame=wp.media({title:"Choose Image",button:{text:"Choose Image"},multiple:!1}),t.on("select",function(){attachment=t.state().get("selection").first().toJSON(),e("#gallerycatimage").val(attachment.url)}),void t.open())})});</script>
   
<?php  
}  

// Save Custom Field Of Category Form
add_action( 'created_category', 'ombre_category_save', 10, 2 );   
add_action( 'edited_category', 'ombre_category_save', 10, 2 );
  
function ombre_category_save( $term_id, $tt_id ) {
  
    if ( isset( $_POST['gallerycatimage'] ) ) {            
        $option_name = 'category_gallerycatimage_' . $term_id;
        update_option( $option_name, $_POST['gallerycatimage'] );
    }
}

/*---------------------------------------------------
Show/Hide some ombre custom post type fields
----------------------------------------------------*/
function ombre_posttype_admin_css() {
    global $post_type;
    $post_types = array(
        'ombregalleries',
        'ombreteam',
        'ombretestimonials',
        'ombreslider',
        'ombrepartners'
    );
    if(in_array($post_type, $post_types)) { ?>
<style type="text/css">
    #post-preview, #view-post-btn, .updated > p > a, #wp-admin-bar-view, #edit-slug-box{display: none !important;}
</style>
    <?php }
}
add_action( 'admin_head-post-new.php', 'ombre_posttype_admin_css' );
add_action( 'admin_head-post.php', 'ombre_posttype_admin_css' );

function ombre_row_actions( $actions )
{
    if((get_post_type() != 'ombreteam') && (get_post_type() != 'ombretestimonials') && (get_post_type() != 'ombreslider') && (get_post_type() != 'ombrepartners')){
        return $actions;
    }
    else {
        unset( $actions['view'] );
        return $actions;
    }
}
add_filter( 'post_row_actions', 'ombre_row_actions', 10, 1 );

/*---------------------------------------------------
Add post format support
----------------------------------------------------*/
add_theme_support( 'post-formats', array('gallery', 'quote', 'video'));
include_once('postformats.php');

/* ---------------------------------------------------------
Get an attachment ID given a URL.
----------------------------------------------------------- */
function ombre_get_attachment_id( $url ) {

	$attachment_id = 0;

	$dir = wp_upload_dir();

	if ( false !== strpos( $url, $dir['baseurl'] . '/' ) ) { // Is URL in uploads directory?

		$file = basename( $url );

		$query_args = array(
			'post_type'   => 'attachment',
			'post_status' => 'inherit',
			'fields'      => 'ids',
			'meta_query'  => array(
				array(
					'value'   => $file,
					'compare' => 'LIKE',
					'key'     => '_wp_attachment_metadata',
				),
			)
		);

		$query = new WP_Query( $query_args );

		if ( $query->have_posts() ) {

			foreach ( $query->posts as $post_id ) {

				$meta = wp_get_attachment_metadata( $post_id );

				$original_file       = basename( $meta['file'] );
				$cropped_image_files = wp_list_pluck( $meta['sizes'], 'file' );

				if ( $original_file === $file || in_array( $file, $cropped_image_files ) ) {
					$attachment_id = $post_id;
					break;
				}
			}
		}
	}
	return $attachment_id;
}

/* ---------------------------------------------------------
Siteorigin page builder live preview fixes
----------------------------------------------------------- */

function ombre_disabled_message() { ?>
    <div class="ombre-box" style="margin:0px;">
    <h6 style="margin:0px;">
    <?php echo esc_attr__( 'Live preview of this section is not available.', 'ombre' ); ?> 
    </h6>
</div>
<?php }

function ombre_no_widget() { ?>
<div class="ombre-box">
    <h6 style="margin:0px;">
    <?php echo esc_attr__( 'Live preview of this widget is not available.', 'ombre' ); ?> 
    </h6>
</div>
<?php }

function ombre_panels_live_editor($value, $post_id, $meta_key){
	if( $meta_key == 'panels_data' && !empty( $_GET['siteorigin_panels_live_editor'] ) && current_user_can( 'edit_post', $post_id ) && !empty( $_POST['siteorigin_panels_data'] ) ) {
        remove_shortcode('ourteam', 'ourteam');
        remove_shortcode('testimonials', 'testimonials');
        remove_shortcode('models', 'models');
        add_shortcode('ourteam', 'ombre_no_widget');
        add_shortcode('testimonials', 'ombre_no_widget');
        add_shortcode('models', 'ombre_no_widget');
        add_shortcode('ombredisablewidgets', 'ombredisablewidgets');
	}

	return $value;
}
add_action('get_post_metadata', 'ombre_panels_live_editor', 9, 3);

/*---------------------------------------------------
Ecwid Custom Styles
----------------------------------------------------*/

if (get_option('ombre_ecwidstyle') == "true") {
function ombre_ecwid_styles()  
{ 
    wp_enqueue_style( 'ombre-ecwid-style', plugin_dir_url( __FILE__ ) . 'css/ecwid.css', false, '1.0');
}
add_action('wp_enqueue_scripts', 'ombre_ecwid_styles');
include ( 'ecwid_css.php' );
}

/*---------------------------------------------------
Add Custom Css
----------------------------------------------------*/
 
function ombre_display_css() {
    $ombre_custom_css = get_option( 'ombre_customcode' );
    if ( !empty( $ombre_custom_css ) ) {
?>
<style type="text/css">
<?php print $ombre_custom_css; ?>
</style>
<?php
    }
}
add_action( 'wp_head', 'ombre_display_css', 99 );   

/* ---------------------------------------------------------
Include other required files
----------------------------------------------------------- */

function ombre_features_main_function(){
    if ( defined( 'CMB2_LOADED' ) ) {
        $ombredir = ( version_compare( PHP_VERSION, '5.3.0' ) >= 0 ) ? __DIR__ : dirname( __FILE__ );
        include_once($ombredir . '/cpt/gallery_cpt.php');
        include_once($ombredir . '/cpt/model_cpt.php');
        include_once($ombredir . '/cpt/homeslider_cpt.php');
        include_once($ombredir . '/cpt/ourteam_cpt.php');
        include_once($ombredir . '/cpt/testimonials_cpt.php');
        include_once($ombredir . '/cpt/partners_cpt.php');
        include_once('ombre-social.php');
        include_once('page-metaboxes.php');
    }
}

add_action('plugins_loaded','ombre_features_main_function');

include_once('ombre-shortcodes.php');
include_once('ombre-widgets.php');
include_once('custom-metaboxes.php');
include_once('scripts.php');
include_once('styles.php');

/* Templates */

function ombre_single_gallery(){
    include('singlegallery.php');
}

function ombre_slider(){
    include('modelslider.php');
}

function ombre_carousel(){
    include('modelcarousel.php');
}

function ombre_header_icons(){
    include('headericons.php');
}

function ombre_footer_icons(){
    include('footericons.php');
}

function ombre_post_format(){
    include('postformat.php');
}

function ombre_single_post_format(){
    include('singlepostformat.php');
}

function ombre_page_slider(){
    include('pageslider.php');
}

function ombre_gallery_menu(){
    include('gallery-menu.php');
}

function ombre_galleries($gallerycolumns){
    include('galleries.php');
}

function ombre_models_menu(){
    include('models-menu.php');
}

function ombre_models($modelscolumns){
    include('models.php');
}

function ombre_home_slider(){
    if ( !shortcode_exists( 'ombredisablewidgets' ) ) {
        include('homeslider.php');
    }
    else { 
        ombre_disabled_message();
    }
}

function ombre_testimonials(){
    if ( !shortcode_exists( 'ombredisablewidgets' ) ) {
        include('testimonials.php');
    }
    else { 
        ombre_disabled_message();
    }
}

function ombre_partners() {
    if ( !shortcode_exists( 'ombredisablewidgets' ) ) {
        include('partners.php');
    }
    else { 
        ombre_disabled_message();
    }
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit