lim2me
Forum Replies Created
-
Hello. The bug is still there. I updated to Breeze v2.0.28 and cleared all the caches. You can check the demo page in the earlier post.
I’ve created a demo of the issue here. Go to DevTools and look for the minified CSS file created by Breeze. Search this file for
breeze-container
. The offending line is this:@container breeze-container(min-width:400px)
Notice how there is no space between the word “breeze-container” and the opening bracket because Breeze removed it. This prevents the container query from working. Now add a space between them in DevTools and the container query should work.
Resize your browser width to test. The background should be red in narrow screens and blue in screens at least 400px wide.
Forum: Fixing WordPress
In reply to: Linking a row action to a plugin file or function@bcworkz thank you, I will take a look at the link. I’m also marking this thread as resolved.
Forum: Fixing WordPress
In reply to: Linking a row action to a plugin file or function@bcworkz could you recommend some resources where I can learn the proper way to do it? Although this plugin is only intended for a private project I would like to learn the recommended way of doing things.
Forum: Fixing WordPress
In reply to: Linking a row action to a plugin file or functionThank you @bcworkz for your reply. Documentation on this is surprisingly hard to come by.
Your clarification on the page query variable makes sense. Adding a link on the admin main navigation would work for a “settings” type page but my action needs to work on the selected Custom Post Type.
I did a bit more testing after making this post and am sharing my (current) solution in case other people are looking for the same thing I was. I do not claim that the method below is “correct” in the context of WordPress development but it works. I’m open to corrections.
add_filter( 'post_row_actions', 'my_plugin_modify_action_links', 15, 2 ); // If your CPT is of type page, hook your function to 'page_row_actions' instead. function my_plugin_modify_action_links( $actions, $post ) { // This function will be called for all post types. Target our custom post type so that our custom action link is not added to other post types. if ( $post->post_type == 'my_custom_post_type' ) { $action_url = admin_url( 'post.php' ); // Note that I'm linking to post.php and not edit.php. $action_url = add_query_arg( array( 'post_type' => 'my_custom_post_type', 'action' => 'my_plugin_custom_action', // Add any other Query variables you need. ), $action_url ); $actions['my_plugin_custom_action'] = '<a href="' . esc_url( $action_url ) . '">My Plugin Custom Action</a>'; } return $actions; } add_action( 'post_action_my_plugin_custom_action', function() { // This is the function that will be called when the user clicks on our custom action link. require plugin_dir_path( __FILE__ ) . '/foo.php'; // This is the file in my plugin that will present the user-interface. exit; // Must exit otherwise WordPress will load edit.php. Going through the code in post.php, other actions also call exit so I'm just following suite. } );
The user-interface file (
foo.php
) needs to include several files in order to create the WordPress admin interface:<?php /** Load WordPress Bootstrap */ require_once ABSPATH . 'wp-admin/admin.php'; /** Load WordPress dashboard API */ require_once ABSPATH . 'wp-admin/includes/dashboard.php'; require_once ABSPATH . 'wp-admin/admin-header.php'; ?> <div class="wrap"> <h1>Page Title here</h1> <p>Some content here</p> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?>
It’s worth mentioning that the reason I linked to
post.php
and notedit.php
is so that I have access to the dynamic post_action_ hook which I can use to load my user-interface file.edit.php
does not seem to provide any hooks.- This reply was modified 2 years, 11 months ago by lim2me.
Thanks! I didn’t realize there was AJAX support.
Forum: Plugins
In reply to: [Adminimize] [Request] Ability to customize the block messageHi Frank. Here is a screenshot of the Block Message. I’d like the ability to change this message.
Forum: Plugins
In reply to: [Bootstrap modal popup] How to implement it in a pageI know this thread is 10 months old but for the benefit of whoever might stumble upon this…
Under the FAQ and Installation sections it says that your theme must have Bootstrap with Modal support. If you don’t have Bootstrap, you can’t use this plugin.
This plugin is extremely simple and does 1 thing: creates the HTML for the modal. But you still need Bootstrap to make it function.
Forum: Plugins
In reply to: [Events] Odd % & numbers showing where date used to show@gdscomp, I suspect your browser cache is showing you the old version of the page. Chrome’s cache in particular is kinda flaky. Clear your browser cache (and maybe restart the browser) and try viewing the page again.
Changing the class names won’t affect the JavaScript that fires to show/hide the Advanced Fields?
Forum: Plugins
In reply to: [Events] Odd % & numbers showing where date used to showYeah, I changed the Date Format and it worked. Thanks for the tip!
Forum: Plugins
In reply to: [Events] Odd % & numbers showing where date used to show@steve@316: I’m getting the same issue. Did you manage to solve the problem? The website you provided (I’m assuming it’s using the Events Plugin) doesn’t show the extra characters.
@nikv Thanks for the link but it’s not quite what I need. The problem is the pods_api_pre_save_pod_item_{podname} filter is called when the custom post type is either Published or Saved as Draft.
There is a way to differentiate Publishing from Saving as a Draft by checking agains the $_POST data but I’m wondering if this is really the best solution. I may have to re-think how I’m going about this.
My custom function must (1) Email the invoice, and (2) Update invoice_sent_date. I initially tied the function to the Publish button but didn’t think about Editing or Saving as Draft. At this point it may be better to have another button to explicitly send the invoice.
I’m marking this thread as resolved for now. I need to re-think this. Thanks again for responding.
Forum: Plugins
In reply to: [Aesop Story Engine] Updated Components DisappearHi again Nick,
It works now. Thanks!
Forum: Plugins
In reply to: [Aesop Story Engine] Updated Components DisappearHi Nick.
Thanks for the prompt response.
I just downloaded v1.2 and tested it. The problem persists. I even tried disabling all plugins except for ASE.
Made a quick video demonstrating the issue here: https://vid.me/sfj