Themeforest Avada主题wordpress错误

时间:2015-12-24 09:43:15

标签: php wordpress

在将我的文件从本地服务器移动到实时服务器后的wp-admin中,我在进入插件页面时遇到问题。

解析错误:syntax error, unexpected '+', expecting ',' or ';' wp-content/plugins/fusion-core/admin/page-builder/classes/class-prebuilt-templates.php on line 30

请让我知道为什么会发生这种错误。

文件代码

<?php
/**
 * Class for Pre-Built templates
 *
 * @package   FusionCore
 * @author  ThemeFusion
 * @link      http://theme-fusion.com
 * @copyright ThemeFusion
 */

if( ! class_exists( 'Fusion_Core_Prebuilt_Templates' ) ) {

    class Fusion_Core_Prebuilt_Templates {

        /**
         * Instance of this class.
         *
         * @since   2.0.0
         *
         * @var   object
         */
        protected static $instance = null;
        /**
         * content of templates.
         *
         * @since   2.0.0
         *
         * @var   string
         */
         protected static $content = 'YTo0MDp7czo0OiJIb21lIjtzOjEzMTY4NToiW2Z1bGx3aWR0aCBiYWNrZ3JvdW5kX2NvbG9yPSIiIGJhY2tncm91bmRfaW1hZ2U9Imh0dHA6Ly90aGVtZS1mdXNpb24uY29tL2F2YWRhL2F2YWRhLXhtbC93cC1jb250ZW50L3VwbG9hZHMvc2l0ZXMvMTIvMjAxNC8xMS9hdmFkYV9jb2xsYWdlX2Rlc2lnbjEtY29tcHJlc3Nvci5qcGciIGJhY2tncm91bmRfcGFyYWxsYXg9InVwIiBlbmFibGVfbW9iaWxlPSJubyIgcGFyYWxsYXhfc3BlZWQ9IjAuNCIgYmFja2dyb3VuZF9yZXBlYXQ9InJlcGVhdCIgYmFja2dyb3VuZF9wb3NpdGlvbj0ibGVmdCB0b3AiIHZpZGVvX3VybD0iIiB2aWRlb19hc3BlY3RfcmF0aW89IjE2OjkiIHZpZGVvX3dlYm09IiIgdmlkZW9fbXA0PSIiIHZpZGVvX29ndj0iIiB2aWRlb19wcmV2aWV3X2ltYWdlPSIiIG92ZXJsYXlfY29sb3I9IiIgb3ZlcmxheV9vcGFjaXR5PSIwLjUiIHZpZGVvX211dGU9InllcyIgdm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EtcmVzcG9uc2l2ZS1tdWx0aXB1cnBvc2UtdGhlbWUvMjgzMzIyNj9yZWY9VGhlbWVGdXNpb24iIGxpbmt0YXJnZXQ9Il9ibGFuayIgYW5pbWF0aW9uX3R5cGU9IjAiIGFuaW1hdGlvbl9kaXJlY3Rpb249ImRvd24iIGFuaW1hdGlvbl9zcGVlZD0iMC4xIiBoaWRlX29uX21vYmlsZT0ibm8iIGNsYXNzPSIiIGlkPSIiXSA8aW1nIGFsdD0iQ29kaW5nIE5vdCBSZXF1aXJlZCIgc3JjPSJodHRwOi8vdGhlbWUtZnVzaW9uLmNvbS9hdmFkYS9hdmFkYS14bWwvd3AtY29udGVudC91cGxvYWRzL3NpdGVzLzEyLzIwMTQvMTEvbm90X3JlcXVpcmVkMS1jb21wcmVzc29yLnBuZyIgLz5bL2ltYWdlZnJhbWVdW2ltYWdlZnJhbWUgbGlnaHRib3g9Im5vIiBsaWdodGJveF9pbWFnZT0iIiBzdHlsZV90eXBlPSJub25lIiBob3Zlcl90eXBlPSJub25lIiBib3JkZXJjb2xvcj0iIiBib3JkZXJzaXplPSIwcHgiIGJvcmRlcnJhZGl1cz0iMCIgc3R5bGVjb2xvcj0iIiBhbGlnbj0iY2VudGVyIiBsaW5rPSJodHRwOi8vdGhlbWVmb3Jlc3QubmV0L2l0ZW0vYXZhZGEtcmVzcG9uc2l2ZS1tdWx0aXB1cnBvc2UtdGhlbWUvMjgzMzIyNj9yZWY9VGhlbWVGdXNpb24iIGxpbmt0YXJnZXQ9Il9ibGFuayIgYW5pbWF0aW9uX3R5cGU9IjAiIGFuaW1hdGlvbl9kaXJlY3Rpb249ImRvd24iIGFuaW1hdGlvbl9zcGVlZD0iMC4xIiBoaWRlX29uX21vYmlsZT0ibI7fQ==';


        function __construct() {
            //construct
        }

        /**
         * Return an instance of this class.
         *
         * @since    2.0.0
         *
         * @return  object  A single instance of this class.
         */
        public static function get_instance() {

            // If the single instance hasn't been set, set it now.
            if ( null == self::$instance ) {
                self::$instance = new self;
            }

            return self::$instance;

        }
        /**
         * Function to get signle page content
         *
         * @since    2.0.0
         *
         * @return  String  Page content
         */
        public function get_single_template() {

            $content    = unserialize( base64_decode( self::$content ) );
            $page       = stripslashes( $content[ $_POST['ID'] ] );

            return $page;
        }
        /**
         * Function to get tab content for pre-built templates
         *
         * @since    2.0.0
         *
         * @return  String  String having tab content
         */
        public function get_prebuilt_templates () {

            $columns        = 6; //number of columns
            $content        = '<div id="pre_built_templates_wrapper"><div id="custom_templates_right" class="custom_pre_built">';
            //get templates data
            $templates      = unserialize( base64_decode( self::$content ) );

            //if value exists and there are more than 1 number of templates
            if ( $templates != false && count( $templates ) > 0 ) {
                //generate column combinations
                $combinations   = FusionHelper::generate_column_combinations( count( $templates ), $columns );
                //add data in each column
                for( $i = 0; $i < $columns; $i++) {
                    //if no data available for this column then break
                    if( $combinations[$i] == 0 ) { break; }
                    $counter = 0 ;
                    $content.= ' <div class="pre_built_templates_section">';

                    foreach( $templates as $key => $value ) {

                        $content.= ' <div class="template_selection_wrapper"> ';
                        $content.= ' <a class="fusion_pre_built_template templates_selection" data-id="'.$key.'" ';
                        $content.= ' href="JavaScript:void(0)">'.$key.'</a>';
                        $content.= ' </div>';

                        //remove current element from array for next iteration
                        unset( $templates[$key] );
                        $counter++;
                        //if reached combination value then break loop
                        if ( $counter == $combinations[$i] ) { break; }
                    }
                    $content.= '</div>';
                }
            }

            $content.=  '</div></div>';

            return $content;

        }

    }

}

0 个答案:

没有答案