Forum Replies Created

Viewing 15 replies - 76 through 90 (of 115 total)
  • Stop using it. No longer works with version 4.

    Thread Starter Bryan Willis

    (@codecandid)

    Posted on github… Thoughts?

    Its because of TinyMCE 4. The plugin is no longer compatible. If you have html editor syntax highlighter, visual composer, or anything else it will destroy your html.

    I had similar issues here and here

    I suggest disabling if/until there is an update ever. It will only get worse.

    <?php
    if ( is_plugin_active('codepress-admin-columns/codepress-admin-columns.php') )  {
    function remove_cpac_floatthead() {
        wp_dequeue_script( 'jquery-floatthead' );
        wp_deregister_script( 'jquery-floatthead' );
            }
    add_action( 'admin_print_scripts', 'remove_cpac_floatthead', 100 );
    }
    }

    Eusebiu deregister it until the next update:

    wp_deregister_script( 'jquery-floatthead' );

    I use code-snippets for things like this. Really useful for short simple functions that you don’t want to put in your functions.php or another plugin.

    On a side note float the head does not work with wordpress tables. I posted a ticket about it a few weeks ago. Ironically I was in the process of building an extension that sticks the admin table headers using it but it breaks wordpress. Not sure if that’s what codepress was using it for, but just a warning if it was…

    https://core.trac.ww.wp.xz.cn/ticket/29030

    I was just going to post this.

    I’m not sure why this is being enqueued in the first place. It doesn’t appear that float the head script is being used anywhere on the table screens as far as I can tell.

    Anyway, here’s the problem:

    if ( $this->is_columns_screen() ) {
    		wp_register_script( 'jquery-floatthead', CPAC_URL . 'external/floatThead/jquery.floatThead.js', array( 'jquery' ), CPAC_VERSION );
    }

    And the script:

    codepress-admin-columns/external/<strong>floatthead</strong>/jquery.floatThead.js

    floatThead vs. floatthead

    Thread Starter Bryan Willis

    (@codecandid)

    No problem. Great plugin otherwise!

    Thread Starter Bryan Willis

    (@codecandid)

    Thanks doublesharp. Haven’t had time to try it out yet, but I will make sure I let you know as soon as I do.

    Thread Starter Bryan Willis

    (@codecandid)

    Thanks for the response. By the way, on hierarchal custom post types pageparentdiv is showing up, which I don’t think should be happening. It’s not an issue, but probably should be removed since it’s repetitive showing that along with the placement in navigation metabox.

    Thread Starter Bryan Willis

    (@codecandid)

    Yea, I was thinking the same thing. Fortunately, for myself I usually only have “Pages” and “Links” visible in on the nav-menus.php page.

    It looks like it has a ton of built in options, but there aren’t any examples on how to use them.

    It looks like followScroll might be the answer which aparently checks if the element is bigger than the browsers window.

    It might have another option to tackle this issue and I’m just not seeing it.

    Another solution might be to check the height of the #side-sortables with jquerys “.height” and if it’s greater than the visible browsers height to disable the script.

    Maybe something like this:

    $("#side-sortables .control-section.accordion-section").on( "click", function(){
        if ($("#side-sortables").height() >= $(window).height()) {
            $("#side-sortables").hcSticky('off');
        }
    });

    It looks like “reinit” will also turn it back on… I haven’t tested any of this though, My jquery is average at best.

    Started working on a fix myself, but just started learning ACF so this could take a while…

    The main file was easy to upgrade:

    <?php
    /*
    Plugin Name: Advanced Custom Fields: Code Area
    Plugin URI: https://github.com/taylormsj/acf-code_area-field
    Description: Adds a 'Code Area' textarea editor to the Advanced Custom Fields WordPress plugin.
    Version: 1.0.1
    Author: Taylor Mitchell-St.Joseph
    Author URI: https://taylormitchellstjoseph.co.uk
    License: GPLv2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    */
    
    class acf_field_code_area_plugin {
    
    	function __construct() {
    		// version 5
    		add_action('acf/include_field_types', array($this, 'include_field_types'));
    
    		// version 4
    		add_action('acf/register_fields', array($this, 'register_fields'));
    
    	}
    
    	// version 4
        function register_fields() {
    		include_once('acf_code_area-v4.php');
    	}
    
    	// version 5
    	function include_field_types( $version ) {
    		include_once('acf_code_area-v5.php');
    	}
    
    }
    
    new acf_field_code_area_plugin();
    
    ?>

    Second I created a new file in the main plugin directory named acf_code_area-v5.php. I then copied over code from v4 file.

    After reading over the V5 changes (very end of the page), I saw that acf/create_field needs o be changed to acf/render_field.

    Also, here is the template for how a field class is suppose to be created in V5.

    This plugin author followed the v4 format exactly how it was suppose to be done, so it shouldn’t be too difficult to figure out how to transfer the code over. I’ll do my best, but if anyone else who has worked with ACF before they will probably be able to figure it out a lot faster.

    I tried debugging and checking debug.log but nothing showed up. I have 0 other plugins installed and it was a fresh install. My issue occured on a site running wordpress-engine which uses apache / nginx hybrid which may or may not be the problem. It was also running at a subdomain (which is how wp-engine sets up by default).

    Also getting error. Its a 502 bad gateway and breaks the site.

    Thread Starter Bryan Willis

    (@codecandid)

    advanced-wp-columns/trunk/assets/js/plugins/columns.js

    onclick: function() {
                                tb_show('Advanced WP Columns', '../wp-content/plugins/advanced-wp-columns/assets/js/plugins/views/columns.html?TB_iframe=1&width=960');
                            }

    Not sure what the correct way to do it is but maybe create a variable in function to to load earlier or something and then later access it with tb_show….

    var url = "<?php echo plugins_url() ?>/advanced-wp-columns/assets/js/plugins/views/columns.html?TB_iframe=1&width=960";
    onclick: function() { tb_show('Advanced WP Columns", url); }
Viewing 15 replies - 76 through 90 (of 115 total)