Forum Replies Created

Viewing 15 replies - 31 through 45 (of 49 total)
  • I’m not exactly an expert in Github, but I’ll learn. Meanwhile, I can provide some suggestions right here:

    First, to make things easier for the help icons in the admin, use this in the class.cptui_admin_ui.php

    public function get_help( $help_text = '' ) {
    	return '<a href="#" title="' . esc_attr( $help_text ) . '" class="cptui-help dashicons-before dashicons-editor-help" title="' . esc_attr( $help_text ) . '"></a>';
    }

    In cptui.css, I changed the styles like this:

    .cptui-help {
    	color: #424242;
      	opacity: 0.5;
    	text-decoration: none;
    	width: 16px;
    	margin-left: 4px;
    }
    .cptui-help:hover {
    	color: #0074a2;
    	opacity: 1;
    }
    .cptui-help:focus {
    	box-shadow: none;
    }

    Then to make a nice CPTUI menu icon using base64, I used this in custom-post-type-ui.php

    function cptui_plugin_menu() {
    	add_menu_page( __( 'Custom Post Types', 'cpt-plugin' ), __( 'CPT UI', 'cpt-plugin' ), 'manage_options', 'cptui_main_menu', 'cptui_settings', 'data:image/svg+xml;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABC9pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wUmlnaHRzPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAv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GhgnKBh0h2YBuQDZIbclI6GXH7/c7cfrSCxEcuHv+7x3/su/7xZxttZi5/XsChfJP5Y3ynskFKwNdAw4Xym89r9UDv0dy1wd1z2/s4F0ERGbgC+WN8iuGQJFZ2tzB303ANbCIa1O4XLZTfiLeq3H8KC8frr3BRU/g/dbzpRflZ+Wd8ta8pjAbeG2VT4VGL0JE2kArXClUeCJ/GqEvuSL/aGtKJz5nAv5oUtdKYCifuwzAa+Bf8OIS7EZdW9PnCQoWBnADox+SQhjwtQcEFby2vQ18iAr5lEOadboJlkxqczcZspWgEJBgLYYEFnwDZZObgHSsHyKBBY/6N2MISEL0sODRjZNK4IAEocGuzT1lAHiJ7dxYGV0CtZEJe0JrJBMl2xQCN+YdK0rvHSYoD/WXhNHfB4DXmfBNrQGZ4KlNBuxYaxcwThUKsYYCPpZAiCT69H5NAR9LgIuEoILnIBBL4hCQOlajyGjMrhLq/WvIGVzKs9FQ/dbrP3I73A0hoY9bfnM8ncaQOHI2Q64awNZEaN6PVgOYf4It78cacEASG668HyOFUlhUClUTg69iU6hYZGpYAtuJcb5jZ2Q5nE5DL4eGLrCIG89+Zqz5QPUQ+aGhSwsJ6JHqYUZj4j0koJlecy5a0GdeVpaLu5lEX+PsVo48380A/MWmQqkn9RzPz2LoZM7WwGrTB8oJI94a9TtB5fsTYABOp6Z0XZr87gAAAABJRU5ErkJggg==' );
    }
    add_action( 'admin_menu', 'cptui_plugin_menu' );

    Hi Michael,

    I have some suggestions on one thing, the help icons.

    I actually took it upon myself to use Font Awesome, and it works great. I added the Font Awesome files, changed the way the A tag gets implemented, and updated the help icon CSS to color: inherit.

    IMHO Looks a little more professional with HTML icons rather than images.

    Also, since WP uses Dashicons, that could also be an effective way to implement the ? icon next to the Label.

    Then when i remove that, this is the error that shows up in your plugin:

    TypeError: tinyMCEPreInit.qtInit[c] is undefined
    …t.qtInit[“black-studio-tinymce-widget”],tinyMCEPreInit.qtInit[c].id=c),!this.is_…

    So i think it’s a combination of things, but meanwhile, your plugin needs some adjustment to make it work with the latest version of WP 4.1

    I think it’s a WordPress core conflict. The error is in the Quick Tags API https://codex.www.ads-software.com/Quicktags_API

    somethumb

    (@somethumb)

    The answer is that when you updated to the newest version of woocommerce, you have to “reinstall” the woocommerce pages because the old system did not use the wc_get_page_id() function, which looks for the shop page.

    Luckily this is super easy! Go to your admin, then to WooCommerce, then to System Status, then click on the Tools tab. Then click the button to the right of Install WooCommerce Pages. This will only install the missing WooCommerce pages and, get this, will reinstall the shop page with the proper “wc_get_page_id”.

    NOTE: if you have content in the original wordpress shop page, although it didn’t erase it for me, you might just want to copy the content first just in case.

    somethumb

    (@somethumb)

    Hi Mike,

    Yes, this seems to be an issue. For some reason, the archive-product.php page only works for the category or tag. Here is my page that has the category for this product: https://rlarson.somethumb.net/product-category/gardening/

    As you can see, I’m printing out the query (modified with a custom field). The Shop page should at least not show the sidebar, as i have removed it from the archive-product.php template. So i KNOW it’s not using the template in my theme.

    https://rlarson.somethumb.net/shop/

    Is it possible that there is a database glitch that is doing this? I don’t have anything in my functions.php file that would cause this. And my index.php and page.php files don’t have a sidebar either.

    I think something is causing the shop page to NOT use the theme’s woocommerce template.

    Thread Starter somethumb

    (@somethumb)

    One more item, in adrotate-ads-edit.php there is a constant for WP_PLUGIN_URL which is deprecated. The new way is to use the function plugins_url()

    So line 25 should not be: wp_enqueue_script(‘uploader-hook’, WP_PLUGIN_URL.’/’.ADROTATE_FOLDER.’/library/uploader-hook.js’, array(‘jquery’));

    It should be: wp_enqueue_script(‘uploader-hook’, plugins_url().’/’.ADROTATE_FOLDER.’/library/uploader-hook.js’, array(‘jquery’));

    That will solve the mixed content issue.

    This is happening where the plugin has the code for if(file_exists($new_path))

    I think the developer may have to perform an action such as this:

    if(file_exists($new)) {
    unlink($new);
    $ok = rename($old, $new);
    } else { $ok = rename($old, $new); }

    Or create a function like this:

    function rename_win($oldfile,$newfile) {
    if (!rename($oldfile,$newfile)) {
    if (copy ($oldfile,$newfile)) {
    unlink($oldfile);
    return TRUE;
    }
    return FALSE;
    }
    return TRUE;
    }

    I referenced this: https://us2.php.net/rename

    Developer, can you implement something like this so that we can overwrite a file? Even if we “permanently delete the file” it actually doesn’t delete it in the relocated directory, so this would be helpful.

    I have this same issue. Is there a solution to this problem? My example is this: I have a Product dropdown with three choices. Each choice will conditionally show a particular section (hiding the other sections), each section containing a 2nd dropdown and a conditional text field (the 2nd dropdown has a choice of ‘other’ and when chosen will show the text field). Each of the 2nd dropdown and text fields have the same web-to-lead field name (which I’ve entered in the Admin Label). The issue is the same as in the previous post where it will take the value of the very last field (in my case, the text field) even when it’s hidden, and put that value into the Salesforce lead (sometimes it’s blank, or if I enter a value in the ‘other’ text field and rehide it by choosing a different Product it will submit that value to SF). However, the resulting email with {all fields} is correct.

    Thread Starter somethumb

    (@somethumb)

    0.21, latest

    Thread Starter somethumb

    (@somethumb)

    My shortcode IS returning the results, not echoing it.

    You would use: $_product->sku

    I put this just below the variation DL

    // Added SKU
    								echo '<dl class="variation">';
    								echo '<dt>Product Number:</dt>';
    								echo '<dd>'.$_product->sku.'</dd>';
    								echo '</dl>';

    I’m getting this too. Take a look:

    https://50.63.128.132/product/bevel-edge-chisel-2-component-handle/

    and

    https://50.63.128.132/product/hss-parting-tool-with-long-handle/

    Somehow lost the ending div for the content area, and also the tabs aren’t working on one along with not showing the variation dropdown.

    I can clear this up. In the WooCommerce plugin, the file woocommerce.php creates both the Customer role and the Shop Manager role using the built-in WordPress function add_role. Notice that the Customer role does have 3 capabilities assigned. Notice that although the 3 capabilities are assigned, only one of them is true (read) and the edit_posts and delete_posts capabilities are false. This means that when looking at the checkboxes in the Roles section of the Members plugin, only the read role will be checked (because the others are false and unchecked!). So even though it says 3, it’s only really 1 true capability. Therefore if you create a duplicate role (let’s say Wholesaler), and only check the read capability, it will show as 1 capability, which is completely correct, because the other capabilities are false and unchecked. And since you assigned it using the Members Plugin tool, and not via a function that assigns other capabilities false, you won’t see the matching 3 capabilities, you’ll only see the 1. I’ve used this with WooCommerce Dynamic Pricing and it works perfectly!

Viewing 15 replies - 31 through 45 (of 49 total)