Forum Replies Created

Viewing 30 posts - 91 through 120 (of 220 total)
  • Author
    Posts
  • Checking again it has stopped creating more and more duplicate files. So I think that has fixed it – thank you.

    PS, on the server I have renamed the old dynamic_avia into OLDdynamic_avia. Then created a new folder called dynamic_avia

    I have then put just the three basic files into this folder:
    avia-merged-styles-e6796b7ff06b6088b499abcfb9b920b1.css
    cs_seating.css
    index.php

    Then gone back to the server to delete the old folder. I have turned off all the performance merging of CSS and Javascript.

    Fingers crossed this will now stop duplicating files!

    Hi Rikard,

    Is this meant to actually delete them for me? Sadly it hasn’t made any difference, although all of them appear to be dated on the 30th of April.

    I have already had a clear out trying to delete them. I decided to download them and reached 10,778 files! Something is copying the same file and date and creating a new file?

    I will try again to delete them all manually and hope that might stop it.

    Not sure what else to do?

    Best wishes,

    Colin

    Ok thanks.

    in reply to: Error after WordPress Update #1200109

    I think I have tracked down the problem in my case. It appears to be the plugin Widgets on Pages which sadly is no longer listed by WordPress.org.

    After de-activating the plug-in the error message disappears.

    I have pasted the code of the file that appears to be causing the problem, but can’t understand where or how to fix the file….

    <?php
    
    /**
     * The admin-specific functionality of the plugin.
     *
     * @link       http://example.com
     * @since      1.0.0
     *
     * @package    Widgets_On_Pages
     * @subpackage Widgets_On_Pages/admin
     */
    /**
     * The admin-specific functionality of the plugin.
     *
     * Defines the plugin name, version, and two examples hooks for how to
     * enqueue the admin-specific stylesheet and JavaScript.
     *
     * @package    Widgets_On_Pages
     * @subpackage Widgets_On_Pages/admin
     * @author     Todd Halfpenny < (Email address hidden if logged out) >
     */
    class Widgets_On_Pages_Admin
    {
        /**
         * The ID of this plugin.
         *
         * @since    1.0.0
         * @access   private
         * @var      string    $plugin_name    The ID of this plugin.
         */
        private  $plugin_name ;
        /**
         * The version of this plugin.
         *
         * @since    1.0.0
         * @access   private
         * @var      string    $version    The current version of this plugin.
         */
        private  $version ;
        /**
         * Initialize the class and set its properties.
         *
         * @since    1.0.0
         * @param string $plugin_name 	The name of this plugin.
         * @param string $version				The version of this plugin.
         */
        public function __construct( $plugin_name, $version )
        {
            $this->plugin_name = $plugin_name;
            $this->version = $version;
            // TODO - Move these filters and hooks out of the constructor.
            add_filter(
                'plugin_action_links' . plugin_basename( __FILE__ ),
                array( $this, 'wop_plugin_action_links' ),
                10,
                2
            );
            add_filter(
                'plugin_row_meta',
                array( $this, 'wop_register_plugins_links' ),
                10,
                2
            );
            add_action( 'admin_menu', array( $this, 'wop_add_options_page' ) );
            add_action( 'admin_init', array( $this, 'wop_register_settings' ) );
            add_action( 'widgets_init', array( $this, 'wop_register_sidebar' ) );
            add_action( 'admin_menu', array( $this, 'wop_remove_hidden_meta' ) );
            // Shortcode/Template Tag Custom Meta on Turbo Sidebar CTP.
            add_action( 'load-post.php', array( $this, 'wop_load_post_hook' ) );
            add_filter(
                'contextual_help',
                array( $this, 'wop_plugin_help' ),
                10,
                3
            );
            // WYSIWYG Tiny MCE.
            add_action( 'admin_head', array( $this, 'wop_add_my_tc_button' ) );
            add_action( 'wp_ajax_twd_cpt_list', array( $this, 'twd_list_ajax' ) );
            add_action( 'admin_footer', array( $this, 'twd_cpt_list' ) );
            if ( wop_fs()->is_not_paying() ) {
                // Auto Insert Turbo Sidebar PRO-feature Custom Meta.
                add_action( 'add_meta_boxes', array( $this, 'wop_add_free_custom_meta' ) );
            }
        }
        
        /**
         * Sets "Settings" link on listing in Plugins screen.
         *
         * @since    1.0.0
         * @param array $links Array of links from plugins admin screen.
         */
        public function wop_plugin_action_links( $links )
        {
            return array_merge( array(
                'settings' => '<a href="' . admin_url( '/options-general.php?page=widgets-on-pages' ) . '">' . __( 'Settings', 'widgets-on-pages' ) . '</a>',
            ), $links );
        }
        
        /**
         * Adds extra links under plugin description in listing on Plugins screen.
         *
         * @since    1.0.0
         * @param array  $links Array of links from plugins admin screen.
         * @param string $file The plugin file name being referenced.
         */
        public function wop_register_plugins_links( $links, $file )
        {
            
            if ( strpos( $file, $this->plugin_name ) !== false ) {
                $new_links = array(
                    'donate' => '<a href="https://datamad.co.uk/donate.php" target="_blank">Donate</a>',
                    'doc'    => '<a href="https://datamad.co.uk/widgets-on-pages" target="_blank">Documentation</a>',
                );
                $links = array_merge( $links, $new_links );
            }
            
            return $links;
        }
        
        /**
         * Adds Admin Menu item.
         *
         * @since    1.0.0
         */
        public function wop_add_options_page()
        {
            // Top level menu -> Directs to Turbo Sidebar listsing.
            add_menu_page(
                __( 'Widgets on Pages Settings', 'widgets-on-pages' ),
                __( 'Widgets on Pages', 'widgets-on-pages' ),
                'manage_options',
                $this->plugin_name,
                array( $this, 'display_options_page' ),
                'dashicons-feedback'
            );
            // Sub menu page -> Settings. Note this appears as 1st option to remove
            // duplicate entry.
            $this->wop_option_screen_id = add_submenu_page(
                $this->plugin_name,
                'Widgets on Pages Settings',
                'Settings',
                'manage_options',
                $this->plugin_name,
                // Note, this is the same as above to remove dupe link.
                array( $this, 'display_options_page' )
            );
            // Sub menu page -> Turbo Sidebar.
            $this->wop_turbo_sidebars_screen_id = add_submenu_page(
                $this->plugin_name,
                'Turbo Sidebars',
                'Turbo Sidebars',
                'edit_posts',
                'edit.php?post_type=turbo-sidebar-cpt'
            );
        }
        
        /**
         * Register our setting
         *
         * @since    1.0.0
         */
        function wop_register_settings()
        {
            register_setting( 'wop_options', 'wop_options_field' );
        }
        
        /**
         * Render the options page for plugin
         *
         * @since  1.0.0
         */
        public function display_options_page()
        {
            include_once 'partials/widgets-on-pages-admin-display.php';
        }
        
        /**
         * Render the options page for plugin
         *
         * @param string	$text The old help.
         * @param string	$screen_id Unique string id of the screen.
         * @param WP_Screen $screen Current WP_Screen instance.
         * @since  1.0.0
         */
        public function wop_plugin_help( $text, $screen_id, $screen )
        {
            
            if ( $screen_id == $this->wop_option_screen_id ) {
                $text = '<h5>Need help with the Widgets on Pages plugin?</h5>';
                $text .= '<p>Check out the documentation and support forums for help with this plugin.</p>';
                $text .= '<a href="http://wordpress.org/extend/plugins/widgets-on-pages/">Documentation</a><br /><a href="https://wordpress.org/support/plugin/widgets-on-pages/">Support forums</a>';
            }
            
            return $text;
        }
        
        /**
         * Removes meta boxes from admin screen
         *
         * @since  1.1.0
         */
        public function wop_remove_hidden_meta()
        {
            remove_meta_box( 'postexcerpt', 'turbo-sidebar-cpt', 'normal' );
        }
        
        /**
         * Hook to add action for shortcode / template tag meta boxes
         * Note: We have this seprate function for the action as we saw this error
         * 	https://wordpress.org/support/topic/warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-13/#post-9420083
         *
         * @since  1.3.0
         */
        public function wop_load_post_hook()
        {
            add_action( 'add_meta_boxes', array( $this, 'wop_add_edit_only_custom_meta' ) );
        }
        
        /**
         * Adds meta boxes from admin screen (Shortcode and Template Tag)
         *
         * @since  1.1.0
         */
        public function wop_add_edit_only_custom_meta()
        {
            // Shortcode & Template Tag- for info and copying.
            add_meta_box(
                'wop-cpt-shortcode-meta-box',
                __( 'Shortcode / Template Tag', 'widgets-on-pages' ),
                array( $this, 'cpt_shortcode_meta_box_markup' ),
                'turbo-sidebar-cpt',
                'side',
                'high',
                null
            );
        }
        
        /**
         * Adds meta boxes from admin screen
         *
         * @since  1.1.0
         */
        public function wop_add_custom_meta()
        {
        }
        
        /**
         * Adds meta boxes from admin screen
         *
         * @since  1.3.0
         */
        public function wop_add_free_custom_meta()
        {
            // Auto Insert.
            add_meta_box(
                'wop-cpt-autoinsert-free-meta-box',
                __( 'Auto Insert', 'widgets-on-pages' ),
                array( $this, 'cpt_autoinsert_free_meta_box_markup' ),
                'turbo-sidebar-cpt',
                'normal',
                'low',
                null
            );
        }
        
        /**
         * Shortcode metabox markup
         *
         * @param object $post Our WP post.
         * @since 1.1.0
         */
        public function cpt_shortcode_meta_box_markup( $post )
        {
            echo  __( '<h4>Shortcode</h4><p>Use this shortcode in your post/page</h4>', 'widgets-on-pages' ) ;
            $shortcode_id = '[widgets_on_pages id="' . $post->post_title . '"]';
            ?>
    		<?php 
            echo  '<p id="wop-shortcode">' . $shortcode_id . '</p><button type="button" id="bq_copy_sc" value="Copy Shortcode" class="button-secondary" />Copy Shortcode</button>' ;
            echo  '<section><h3>' . esc_html__( 'Insert using the visual editor', 'widgets-on-pages' ) . '</h3>' ;
            echo  '<p>' . esc_html__( 'Use the visual editor to add Turbo Sidebars.', 'widgets-on-pages' ) ;
            if ( wop_fs()->is_not_paying() ) {
                echo  '<p><a href="' . wop_fs()->get_upgrade_url() . '">' . esc_html__( 'Upgrade Now', 'widgets-on-pages' ) . '</a>' . esc_html__( ' And you can arrange widgets in columns, too!', 'widgets-on-pages' ) ;
            }
            echo  '</section>' ;
            echo  __( '<h4>Template Tag</h4><p>Use this code to include the sidebar in your theme.</h4>', 'widgets-on-pages' ) ;
            $shortcode_id = esc_html( '<?php widgets_on_template("' . $post->post_title . '");?>' );
            echo  '<p id="wop-template-tag">' . $shortcode_id . '</p><button type="button" id="bq_copy_tt" value="Copy Shortcode" class="button-secondary" />Copy PHP</button>' ;
        }
        
        /**
         * Auto Insert PRO INFO metabox markup
         *
         * @since 1.3.0
         */
        public function cpt_autoinsert_free_meta_box_markup()
        {
            // Show our custom meta options.
            ?>
    		<div class='inside'>
    			<?php 
            echo  '<h4>' . esc_html__( 'Auto Insert options is a Widgets on Pages PRO feature', 'widgets-on-pages' ) . '</h4><p>' . esc_html__( 'To auto-insert widgets into your theme\'s header, before-or-after page content, or into your theme\'s footer you need ', 'widgets-on-pages' ) . '<a href="' . wop_fs()->get_upgrade_url() . '">Widgets on Pages PRO.</a></p><p><a href="' . wop_fs()->get_upgrade_url() . '">' . esc_html__( 'Upgrade now', 'widgets-on-pages' ) . '</a> ' . esc_html( 'to access these features (and more), updates and priority support', 'widgets-on-pages' ) . '</p>' ;
            echo  '<a class="button-primary" href="' . wop_fs()->get_upgrade_url() . '">' . esc_html__( 'Get PRO Features', 'widgets-on-pages' ) . '</a>' ;
            ?>
    		</div>
    		<hr/>
    		<div class='inside'>
    			<h3><?php 
            _e( 'Auto Insert', 'widgets-on-pages' );
            ?></h3>
    			<p>
    				<input type="radio"  disabled /> Yes<br />
    				<input type="radio"  disabled/> No
    			</p>
    		</div>
    
    		<div class='inside'>
    			<h3><?php 
            _e( 'Position', 'widgets-on-pages' );
            ?></h3>
    			<p>
    				<input type="radio" disabled /> Before Header<br />
    				<input type="radio" disabled /> After Header
    			</p>
    			<p>
    				<input type="radio" disabled /> Before Content<br />
    				<input type="radio" disabled /> After Content
    			</p>
    			<p>
    				<input type="radio" disabled /> Before Footer<br />
    				<input type="radio" disabled /> After Footer
    			</p>
    			</p>
    		</div>
    
    		<div class='inside'>
    			<h3><?php 
            _e( 'Show on Posts / Pages', 'widgets-on-pages' );
            ?></h3>
    			<p>
    				<input type="radio" disabled /> Posts<br />
    				<input type="radio" disabled /> Pages<br />
    				<input type="radio" disabled /> Posts & Pages
    			</p>
    		</div>
    
    		<div class='inside'>
    			<h3><?php 
            _e( 'Layout Options', 'widgets-on-pages' );
            ?></h3>
    			<p><?php 
            _e( 'Number of widget columms per screen size', 'widgets-on-pages' );
            ?></p>
    			<p><label><?php 
            _e( 'Small Screen', 'widgets-on-pages' );
            ?></label>
    				<select>
    				    <option value="1" selected>1</option>
    				    <option value="2">2</option>
    				    <option value="3">3</option>
    				    <option value="4">4</option>
    				</select>
    			</p>
    			<p><label><?php 
            _e( 'Medium Screen', 'widgets-on-pages' );
            ?></label>
    				<select>
    				    <option value="1">1</option>
    				    <option value="2">2</option>
    				    <option value="3">3</option>
    				    <option value="4">4</option>
    				</select>
    			</p>
    			<p><label><?php 
            _e( 'Large Screen', 'widgets-on-pages' );
            ?></label>
    				<select>
    				    <option value="1">1</option>
    				    <option value="2">2</option>
    				    <option value="3">3</option>
    				    <option value="4">4</option>
    				</select>
    			</p>
    			<p><label><?php 
            _e( 'Wide Screen', 'widgets-on-pages' );
            ?></label>
    				<select>
    				    <option value="1"></option>
    				    <option value="2"></option>
    				    <option value="3"></option>
    				    <option value="4"></option>
    				</select>
    			</p>
    
    		<?php 
        }
        
        /**
         * Creates a new Turbo Sidebars custom post type
         *
         * @since 	1.0.0
         * @uses 	register_post_type()
         */
        public static function wop_cpt_turbo_sidebars()
        {
            $cap_type = 'post';
            $plural = 'Turbo Sidebars';
            $single = 'Turbo Sidebar';
            $cpt_name = 'turbo-sidebar-cpt';
            $opts['can_export'] = true;
            $opts['capability_type'] = $cap_type;
            $opts['description'] = '';
            $opts['exclude_from_search'] = true;
            $opts['has_archive'] = false;
            $opts['hierarchical'] = false;
            $opts['map_meta_cap'] = true;
            $opts['menu_icon'] = 'dashicons-welcome-widgets-menus';
            $opts['menu_position'] = 60;
            $opts['public'] = false;
            $opts['publicly_querable'] = false;
            $opts['query_var'] = true;
            $opts['register_meta_box_cb'] = '';
            $opts['rewrite'] = false;
            $opts['show_in_admin_bar'] = false;
            $opts['show_in_menu'] = 'admin.php?page=widgets-on-pages';
            // $opts['show_in_menu']							= true;
            $opts['show_in_nav_menu'] = false;
            $opts['show_ui'] = true;
            $opts['supports'] = array( 'title', 'excerpt' );
            $opts['taxonomies'] = array();
            $opts['capabilities']['delete_others_posts'] = "delete_others_{$cap_type}s";
            $opts['capabilities']['delete_post'] = "delete_{$cap_type}";
            $opts['capabilities']['delete_posts'] = "delete_{$cap_type}s";
            $opts['capabilities']['delete_private_posts'] = "delete_private_{$cap_type}s";
            $opts['capabilities']['delete_published_posts'] = "delete_published_{$cap_type}s";
            $opts['capabilities']['edit_others_posts'] = "edit_others_{$cap_type}s";
            $opts['capabilities']['edit_post'] = "edit_{$cap_type}";
            $opts['capabilities']['edit_posts'] = "edit_{$cap_type}s";
            $opts['capabilities']['edit_private_posts'] = "edit_private_{$cap_type}s";
            $opts['capabilities']['edit_published_posts'] = "edit_published_{$cap_type}s";
            $opts['capabilities']['publish_posts'] = "publish_{$cap_type}s";
            $opts['capabilities']['read_post'] = "read_{$cap_type}";
            $opts['capabilities']['read_private_posts'] = "read_private_{$cap_type}s";
            $opts['labels']['add_new'] = esc_html__( "Add New {$single}", 'now-widgets-on-pages' );
            $opts['labels']['add_new_item'] = esc_html__( "Add New {$single}", 'widgets-on-pages' );
            $opts['labels']['all_items'] = esc_html__( $plural, 'widgets-on-pages' );
            $opts['labels']['edit_item'] = esc_html__( "Edit {$single}", 'widgets-on-pages' );
            $opts['labels']['menu_name'] = esc_html__( $plural, 'widgets-on-pages' );
            $opts['labels']['name'] = esc_html__( $plural, 'widgets-on-pages' );
            $opts['labels']['name_admin_bar'] = esc_html__( $single, 'widgets-on-pages' );
            $opts['labels']['new_item'] = esc_html__( "New {$single}", 'widgets-on-pages' );
            $opts['labels']['not_found'] = esc_html__( "No {$plural} Found", 'widgets-on-pages' );
            $opts['labels']['not_found_in_trash'] = esc_html__( "No {$plural} Found in Trash", 'widgets-on-pages' );
            $opts['labels']['parent_item_colon'] = esc_html__( "Parent {$plural} :", 'widgets-on-pages' );
            $opts['labels']['search_items'] = esc_html__( "Search {$plural}", 'widgets-on-pages' );
            $opts['labels']['singular_name'] = esc_html__( $single, 'widgets-on-pages' );
            $opts['labels']['view_item'] = esc_html__( "View {$single}", 'widgets-on-pages' );
            $opts['rewrite']['ep_mask'] = EP_PERMALINK;
            $opts['rewrite']['feeds'] = false;
            $opts['rewrite']['pages'] = true;
            $opts['rewrite']['slug'] = esc_html__( strtolower( $plural ), 'widgets-on-pages' );
            $opts['rewrite']['with_front'] = false;
            $opts = apply_filters( 'turbo-sidebars-cpt-options', $opts );
            register_post_type( strtolower( $cpt_name ), $opts );
        }
        
        /**
         * Register the sidebars, based upon our Turbo Sidebars.
         *
         * @since    1.0.0
         */
        public function wop_register_sidebar()
        {
            // Register my sidebars.
            $args = array(
                'post_type'      => 'turbo-sidebar-cpt',
                'posts_per_page' => 100,
            );
            // Note: not using WP_Query as can cause pages to not display (e.g. Manage
            // Subscriptions link with Subscribe to Comments Reloaded - https://core.trac.wordpress.org/ticket/18408).
            $myposts = get_posts( $args );
            foreach ( $myposts as $post ) {
                setup_postdata( $post );
                
                if ( is_numeric( $post->post_name ) ) {
                    $name = 'Widgets on Pages ' . $post->post_name;
                    $shortcode_id = $post->post_name;
                    $id = 'wop-' . $post->post_name;
                } else {
                    $name = $post->post_title;
                    $id = 'wop-' . $post->post_name;
                    $shortcode_id = $post->post_title;
                }
                
                if ( '' != $post->post_excerpt ) {
                    $id = 'wop-' . $post->post_excerpt;
                }
                $desc = 'Widgets on Pages sidebar. Use shortcode';
                register_sidebar( array(
                    'name'          => $name,
                    'id'            => $id,
                    'description'   => __( $desc, 'widgets-on-pages' ) . ' [widgets_on_pages id="' . $shortcode_id . '"]',
                    'class'         => 'turbo-sidebar',
                    'before_widget' => '<li id="%1$s" class="widget %2$s">',
                    'after_widget'  => '</li>',
                    'before_title'  => '<h2 class="widgettitle">',
                    'after_title'   => '</h2>',
                ) );
            }
        }
        
        /**
         * Register the stylesheets for the admin area.
         *
         * @since    1.0.0
         */
        public function enqueue_styles()
        {
            /**
             * This function is provided for demonstration purposes only.
             *
             * An instance of this class should be passed to the run() function
             * defined in Widgets_On_Pages_Loader as all of the hooks are defined
             * in that particular class.
             *
             * The Widgets_On_Pages_Loader will then create the relationship
             * between the defined hooks and the functions defined in this
             * class.
             */
            wp_enqueue_style(
                $this->plugin_name,
                plugin_dir_url( __FILE__ ) . 'css/widgets-on-pages-admin.css',
                array(),
                $this->version,
                'all'
            );
        }
        
        /**
         * Register the JavaScript for the admin area.
         *
         * @param string $hook Name of our hook.
         * @since    1.0.0
         */
        public function enqueue_scripts( $hook )
        {
            /**
             * This function is provided for demonstration purposes only.
             *
             * An instance of this class should be passed to the run() function
             * defined in Widgets_On_Pages_Loader as all of the hooks are defined
             * in that particular class.
             *
             * The Widgets_On_Pages_Loader will then create the relationship
             * between the defined hooks and the functions defined in this
             * class.
             */
            // Load our JS for Turbo Sidebars admin screen.
            
            if ( in_array( $hook, array( 'post.php', 'post-new.php' ) ) ) {
                $screen = get_current_screen();
                
                if ( is_object( $screen ) && 'turbo-sidebar-cpt' == $screen->post_type ) {
                    wp_enqueue_script(
                        $this->plugin_name,
                        plugin_dir_url( __FILE__ ) . 'js/wop-cpt-admin.js',
                        array( 'jquery' ),
                        $this->version,
                        true
                    );
                    wp_enqueue_script(
                        $this->plugin_name . '_prem',
                        plugin_dir_url( __FILE__ ) . 'js/wop-cpt-admin__premium_only.js',
                        array( 'jquery' ),
                        $this->version,
                        true
                    );
                }
            
            }
        
        }
        
        /**
         * Adds a button to the TinyMCE editor.
         */
        public function wop_add_my_tc_button()
        {
            global  $typenow ;
            // Check user permissions.
            if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {
                return;
            }
            // Verify the post type.
            if ( !in_array( $typenow, array( 'post', 'page' ) ) ) {
                return;
            }
            // Check if WYSIWYG is enabled.
            
            if ( get_user_option( 'rich_editing' ) == 'true' ) {
                add_filter( 'mce_external_plugins', array( $this, 'wop_add_tinymce_plugin' ) );
                add_filter( 'mce_buttons', array( $this, 'wop_register_my_tc_button' ) );
            }
        
        }
        
        /**
         * Sets up the link from our button to our JS.
         *
         * @param  array $plugin_array Exsting plugin array.
         * @return arry               Our updated plugin array.
         */
        public function wop_add_tinymce_plugin( $plugin_array )
        {
            $plugin_array['wop_tc_button'] = plugins_url( '/js/wop-tinymce-plugin.js', __FILE__ );
            return $plugin_array;
        }
        
        /**
         * Add our TinyMCE button.
         *
         * @param  array $buttons Existing array of buttons.
         * @return array          Updated array of buttons.
         */
        public static function wop_register_my_tc_button( $buttons )
        {
            array_push( $buttons, 'wop_tc_button' );
            return $buttons;
        }
        
        /**
         * Function to fetch buttons
         *
         * @since  1.1.0
         */
        public function twd_list_ajax()
        {
            // Check for nonce.
            check_ajax_referer( 'twd-nonce', 'security' );
            $list = array();
            $args = array(
                'post_type'      => 'turbo-sidebar-cpt',
                'posts_per_page' => 100,
            );
            $loop = new WP_Query( $args );
            while ( $loop->have_posts() ) {
                $loop->the_post();
                
                if ( is_numeric( $loop->post->post_name ) ) {
                    $name = 'Widgets on Pages ' . $loop->post->post_name;
                    $shortcode_id = $loop->post->post_name;
                    $id = 'wop-' . $loop->post->post_name;
                } else {
                    $name = $loop->post->post_title;
                    $id = 'wop-' . $loop->post->post_name;
                    $shortcode_id = $loop->post->post_title;
                }
                
                if ( '' != get_the_excerpt( $loop->post ) ) {
                    $id = 'wop-' . get_the_excerpt( $loop->post );
                }
                $list[] = array(
                    'text'  => $name,
                    'value' => $id,
                );
            }
            echo  wp_send_json( $list ) ;
            wp_die();
            // This is required to terminate immediately and return a proper response.
        }
        
        /**
         * Function to output button list ajax script
         *
         * @since  1.1.0
         */
        public function twd_cpt_list()
        {
            // Create nonce.
            global  $pagenow ;
            
            if ( 'admin.php' != $pagenow ) {
                $nonce = wp_create_nonce( 'twd-nonce' );
                $notPaying = false;
                if ( wop_fs()->is_not_paying() ) {
                    $notPaying = true;
                }
                ?><script type="text/javascript">
    				jQuery( document ).ready( function( $ ) {
    					var data = {
    						'action'	: 'twd_cpt_list', // wp ajax action
    						'security'	: '<?php 
                echo  $nonce ;
                ?>' // nonce value created earlier
    					};
    					// Fire ajax.
    						jQuery.post( ajaxurl, data, function( response ) {
    							console.log("WOP", response);
    							// If nonce fails then not authorized else settings saved.
    							if( response === '-1' ){
    								// Do nothing.
    								console.log('error');
    							} else {
    								if (typeof(tinyMCE) != 'undefined') {
    									if (tinyMCE.activeEditor != null) {
    										tinyMCE.activeEditor.settings.cptPostsList = response;
    										tinyMCE.activeEditor.settings.notPaying = <?php 
                echo  $notPaying ;
                ?>;
    									}
    								}
    							}
    						});
    				});
    			</script>
    	<?php 
            }
        
        }
    
    }
    in reply to: Error after WordPress Update #1200077

    I have the same problem too. I have around 10 wordpress websites all updated yesterday. But oddly only one of them had this error message.
    I copied the file the error refers to from a site that didn’t have the error message, hoping this would solve the problem. Sadly it didn’t.
    I wonder if the message is coming from a plugin rather than the file it mentions?
    I’d be grateful for any more clues please.

    Thanks, Colin

    in reply to: Change Envato private token ? #1186022

    Thank you Ismael! that has fixed the problem perfectly.

    Much appreciated.

    Colin

    in reply to: Change Envato private token ? #1185154

    I have one code for all of my sites. Although each site was bought separately, when you moved over to the new token system I was told to use the same token for all my sites. The problem now is that one client has gone AWOL with my code.

    How do I generate a new code that can be used for all my sites except the rogue one?

    Thanks

    in reply to: Image size always seems to be "scaled" #1183003

    Hi Ismael, works a treat – thank you!

    in reply to: Two sites' category images don't match dimensions #1157195

    Don’t worry. I have found out the problem. WooCommerce was set to crop images in:

    Appearance > Customise > WooCommerce > Product images.

    So all sorted.

    Hi Mike,

    That’s great thank you. All done!

    No I’m all sorted now thank you.

    Yes it’s ok to close the topic.

    That’s great thank you!

    Ok here are the details

    Thank you!

    The category image is actually the chunk of brown at the top of the page. It should be displaying as a proper photo that looks like the Pearl Clasps image shown on the category page.

    Hi Sorry, I had to hide them so the client couldn’t see the problem pages!

    Here is a page with the category image turned on.

    Thanks for your help.

    in reply to: Multiple Enfold purchases and Token doesn't seem to work #1027977

    I have done as you suggest using the same token each time which seems to work.
    So let’s say it is fixed and not waste any more time sorting out.

    Thanks for all your help.

    in reply to: Multiple Enfold purchases and Token doesn't seem to work #1027943

    Hiya,

    I have tried it for Dawes Jewellery but it didn’t recognise the site’s URL – which then showed the error I sent to you last time.

    When I set up the token do I have to put MY domain name for ALL the other clients?

    in reply to: Multiple Enfold purchases and Token doesn't seem to work #1027444

    I have now tried to generate another token filling in the domain name of the client DawesJewellery. I got the token ok.

    But when adding the token to the DawesJewellery Enfold theme update page I get this error:

    Last time we checked the token we were not able to connected to Envato:

    Purchases could not be accessed
    Username could not be accessed (needed for your information only)
    E-Mail could not be accessed (needed for your information only)
    Following errors occured:

    Purchases: Errorcode 403 returned by Envato: Forbidden
    username Errorcode 403 returned by Envato: Forbidden
    email Errorcode 403 returned by Envato: Forbidden
    Purchases: A problem occured accessing your purchases. Unable to check for updates.

    I am rapidly losing any faith in this crack-pot new system which seems not to have been thought through!

    in reply to: Multiple Enfold purchases and Token doesn't seem to work #1027439

    Hi again,

    I see you must have fixed something as the new token has been accepted on one of my sites. I will see if I can generate 8x different codes for the client’s websites. Not sure how it will let me generate 8x codes? How would it know I have 8x genuine versions of Enfold?

    in reply to: Multiple Enfold purchases and Token doesn't seem to work #1027191

    Sorry everyone. Nothing seems to have solved these problems.

    1) I cannot delete the OLD user name / key
    Literally, the text cannot be edited or deleted.

    2) what do I do about 8x multiple purchases of Enfold on the SAME account.
    Where do I get 8x different Envato private tokens for all my clients?

    Any more suggestions??

    in reply to: Multiple Enfold purchases and Token doesn't seem to work #1026772

    I have tried private mode (on Safari) but the latest problem I can’t even delete the the Themeforest User Name and key!

    I have tried deleting these in Chrome too. I can’t remove them.

    I also need to know how to create multiple tokens for all 8x Enfold themes I have bought.

    Actually, don’t worry. I have gone the plug-in route which seems to work.

    I would like to suggest this change as a possible improvement for the next version of Enfold. “Masonry Gallery” and “Gallery”both work perfectly with large images and a much easier way to do the drag and drop. Easy Sliders is a bit hard to do quick changes to.

    Thanks for all your help!

    Colin

    Hi Nikko,

    Thank you for the suggestions. I have added the extra functions to the functions.php inside my enfold-child folder.

    Then created a new CSS file called admin.css and added the css you specified.

    But after deleting the cache the changes don’t appear to have made any difference.

    I then tried changing the link in the functions file to this, thinking perhaps the functions file isn’t finding the css:

    function admin_style() {
      wp_enqueue_style('admin-styles', get_template_directory_uri().'admin.css');
    }
    add_action('admin_enqueue_scripts', 'admin_style');

    But that doesn’t work either. Is there something I am missing?

    Here we go.

    This is on my laptop, but on my 27″ iMacPro it is just as bad.

    That’s fixed it – thank you!

    Ok thanks for looking at them.

    The problem is that the FIRST one is wrongly always 100%, then the rest seem to be whatever has been set.

    I need to make ALL the items in the portfolio grid to be the same size.

    I hope that this helps explain what I am looking for.

    Hi, the problem seems to be on mid-sized browsers. See screen shot.

    This is using the portfolio grid. See settings screen shots too.

    Thanks for your help!

    in reply to: Change SEARCH so that it recognises product SKUs? #968336

    Thanks that’s helpful.

    C

    Thank you.

Viewing 30 posts - 91 through 120 (of 220 total)