Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/417.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript WP bakery右键单击“另存为”已禁用。我想启用它_Javascript_Wordpress_Wpbakery - Fatal编程技术网

Javascript WP bakery右键单击“另存为”已禁用。我想启用它

Javascript WP bakery右键单击“另存为”已禁用。我想启用它,javascript,wordpress,wpbakery,Javascript,Wordpress,Wpbakery,我使用Wordpress作为我网站的CMS。我正在使用Thomas Rodus的Sugarland主题(该主题使用WP Bakery作为页面生成器),不幸的是,我的支持已经用完,我刚刚意识到右键单击另存为/从我的网站下载图像被禁用/无法访问。这并不好,因为这意味着任何潜在的客户、机构等都无法快速保存我的图像并存储它们以供以后查看 我的知识是有限的,但在使用WP和托管我的网站以及诸如此类的东西的这些年里,我已经设法做了一些自定义。我通常可以找出错误并修复它,但我找不到是哪个元素导致了问题,如果是用

我使用Wordpress作为我网站的CMS。我正在使用Thomas Rodus的Sugarland主题(该主题使用WP Bakery作为页面生成器),不幸的是,我的支持已经用完,我刚刚意识到右键单击另存为/从我的网站下载图像被禁用/无法访问。这并不好,因为这意味着任何潜在的客户、机构等都无法快速保存我的图像并存储它们以供以后查看

我的知识是有限的,但在使用WP和托管我的网站以及诸如此类的东西的这些年里,我已经设法做了一些自定义。我通常可以找出错误并修复它,但我找不到是哪个元素导致了问题,如果是用于ajax覆盖的PHP文件(content portfolio ajax,content portfolio nav),或者是Jquery文件(Jquery.fancybox.pack),因为我看不到任何明显的迹象表明某些内容被禁用

------内容组合ajax:---------


--------或内容组合导航:---------


----或者这个JS(jquery.fancybox.pack)(我没有粘贴整个东西,因为它太大了,我不确定哪一位与问题相关------


(函数(C,z,f,r){var q=f(C),n=f(z),b=f.fancybox=function(){b.open.apply(this,arguments)},H=navigator.userAgent.match(/msie/i),w=null,s=z.createTouch!==r,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},p=function(a){return a&&“string”==f.type(a)},f=function(a)}&&0禁用右键单击的方法有很多,但常用的方法是

document.addEventListener('contextmenu',event=>event.preventDefault());

如果要禁用禁用,则需要找到对
contextmenu
onContextMenu
或类似内容的引用

你包含的代码片段中没有这个,所以它可能在主题或插件文件夹的其他地方


如果没有更多的代码,我帮不上什么忙,但是祝你自己找到它好运!如果你能提供更多信息,请告诉我们。

谢谢!我会仔细查看我的文件,看看是否能找到引用它的内容。谢谢你的帮助:D
<?php 
    $prev_post = get_adjacent_post(false, '', true);
    $next_post = get_adjacent_post(false, '', false);
?>

<div id="project-title" class="centered">
    <div class="parent">
        <div class="child">

            <?php 
                the_title('<h3>', '</h3>'); 
                the_excerpt();
            ?>

            <a href="<?php the_permalink(); ?>" class="button"><?php esc_html_e('Details', 'sugarland'); ?></a>

        </div>
    </div>
</div>

<div id="project-slider">

    <figure class="images">
        <?php the_post_thumbnail('full'); ?>
    </figure>

    <?php if(!empty($next_post)) : ?>
        <a class="ajax-prev" href="<?php echo esc_url(get_permalink($next_post->ID)); ?>"></a>
    <?php endif; ?>

    <?php if(!empty($prev_post)) : ?>
        <a class="ajax-next" href="<?php echo esc_url(get_permalink($prev_post->ID)); ?>"></a>
    <?php endif; ?>

</div>
<?php
    global $post;

    $url[] = '';
    $url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full');

    $prev_post = get_adjacent_post(false, '', true);
    $next_post = get_adjacent_post(false, '', false);       

    $displays = get_option('ebor_cpt_display_options');
    $slug = ( $displays['portfolio_slug'] ) ? $displays['portfolio_slug'] : $slug = 'portfolio';
?>

<div class="padding-0 clearfix" data-ref="mixitup-container">

    <?php if(!empty($prev_post)) : ?>
        <div class="mix item clearfix col-sm-4 col-xs-12 home portfolio lifestyle" data-ref="mixitup-target">
            <a href="<?php echo esc_url(get_permalink($prev_post->ID)); ?>">
                <figure class="images"> 
                    <?php $src = wp_get_attachment_image_src(get_post_thumbnail_id( $prev_post->ID ), 'full'); ?>
                    <img src="<?php echo esc_url($src[0]); ?>" alt="<span><?php echo ebor_the_terms('portfolio_category', ', ', 'name'); ?></span><?php echo get_the_title($prev_post->ID); ?>" class="slip" /> 
                </figure>
            </a>
        </div>
    <?php endif; ?>

    <div class="mix item clearfix col-sm-4 col-xs-12 home portfolio blank" data-ref="mixitup-target">
        <a href="<?php echo esc_url( home_url('/') . $slug ); ?>">

            <figure class="images"> 
                <img src="<?php echo EBOR_THEME_DIRECTORY; ?>assets/images/blank.jpg" alt="Blank Image" /> 
            </figure>

            <div class="info-box-content">
                <div class="parent">
                    <div class="child">
                        <h5><i class="fa fa-th"></i> <?php esc_html_e('Overview', 'sugarland'); ?></h5>
                    </div>
                </div>
            </div>

        </a>
    </div>

    <?php if(!empty($next_post)) : ?>
        <div class="mix item clearfix col-sm-4 col-xs-12 home portfolio travel" data-ref="mixitup-target">
            <a href="<?php echo esc_url(get_permalink($next_post->ID)); ?>">
                <figure class="images"> 
                    <?php $src = wp_get_attachment_image_src(get_post_thumbnail_id( $next_post->ID ), 'full'); ?>
                    <img src="<?php echo esc_url($src[0]); ?>" alt="<span><?php echo ebor_the_terms('portfolio_category', ', ', 'name'); ?></span><?php echo get_the_title($next_post->ID); ?>" class="slip" /> 
                </figure>
            </a>
        </div>
    <?php endif; ?>

</div>
(function(C,z,f,r){var q=f(C),n=f(z),b=f.fancybox=function(){b.open.apply(this,arguments)},H=navigator.userAgent.match(/msie/i),w=null,s=z.createTouch!==r,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},p=function(a){return a&&"string"===f.type(a)},F=function(a){return p(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&F(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},x=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.4",defaults:{padding:0,margin:10,width:800,
height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",
34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+