TIEro
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Optimizer] Framework subdir contents disappearingSolved it myself. cPanel support couldn’t find anything wrong, I couldn’t find anything wrong, no reply from Optimizer. Restored an UpdraftPlus backup of the themes directory and it all started working again. Just one of those things, I guess.
Forum: Themes and Templates
In reply to: [Optimizer] Framework subdir contents disappearingUpdate: it’s not any other plugin (deactivated them all, still happens) and it’s just Optimizer (no other theme has disappearing files).
Forum: Themes and Templates
In reply to: [Optimizer] Mixed content (non-https) with images(Closing)
Forum: Themes and Templates
In reply to: [Optimizer] Mixed content (non-https) with imagesThat appears to have done it, thanks.
You know, you may be better off storing a relative path and having WP add the base URL to the front of it, so that an http-to-https change (or domain change or whatever) wouldn’t affect it. 🙂
Forum: Reviews
In reply to: [Gutenberg] Absolutely the worst thing to happen to WP. Ever.Pretty much everything everyone reported in the beta (and since) that should have made WP realise that it was a godawful idea.
And yeah, been using the classic editor plugin on every site since Gutencrap went live. Says it all, really, that the classic plugin gets great ratings and endless downloads compared to the new thing with 1 star and everyone avoiding it.
It would’ve helped a week ago when the problem happened. I rebuilt from my testbed installation, though I lost some changes in the process.
Where’s the old data stored in the database? I’ll find it manually and fix it that way. 🙂
Forum: Themes and Templates
In reply to: [Portfolio Lite] First para fontApologies for the delay in replying: WP never sends me updates, even though I have the option marked.
Your solution would mean editing the style.css of the theme – changes which would be lost when it’s updated.
Is there a replacement I can use in “Additional CSS” or in a child theme style.css to negate the first para settings instead? That’ll be a better solution.
Thanks!
Forum: Themes and Templates
In reply to: [Portfolio Lite] Organic blog posts widgetForum: Developing with WordPress
In reply to: Session variable not passing through to registrationAha! Of course… because it runs the session bit at the start of each page load, so it checks the URL *again* and finds no “?ref=”, so assigns zero. It’s all so obvious once someone smart points it out. Thank you VERY much.
For reference, added a “!isset” check to the session function as follows:
function was_start_session() { // Check for an active session: if there is none, start one. if (session_status() == PHP_SESSION_NONE) { session_start(); } // Check for referrer and store in session. // If there is no referrer, assign to user zero. if (!isset($_SESSION['ref'])) { $_SESSION['ref'] = (isset($_GET['ref'])) ? $_GET['ref'] : 0; } }Tested and working. Resolved. Thanks again!
- This reply was modified 8 years, 11 months ago by TIEro.
Forum: Developing with WordPress
In reply to: Session variable not passing through to registrationUpdate: tested on a clean install with only that plugin running and the basic Twenty[x]teen theme. Nope, still not working. 🙁
Forum: Plugins
In reply to: [Email Queue by BestWebSoft] [Email Queue by BestWebSoft] Catches wpmail?Just looked at screenshots and answered my own question: no, it doesn’t trap all wp_mail.
Ah, well. 🙂
Forum: Hacks
In reply to: How to display wp-editor word count?Hi,
“So I should copy the file tinymce_4.5.1\tinymce\js\tinymce\plugins\wordcount\plugin.min.js
and upload it to my folder: /httpdocs/wp-content/plugins/wp-voting-contest?”Yes, that’s what I did for my testing.
I guess you could put the file anywhere but I figured including it as part of the plugin was best.
For the final version of mine, I created a sub-folder in my plugin for TinyMCE stuff, in case I wanted to add more plugins, so mine ended up in /plugins/plugin-name/tinymce/plugins/wordcount – which is HORRIBLY ugly but probably best practice. If you only want to use one plugin, stuff it in the top folder. It’s easier. 🙂
I put the filter code in my main plugin file, so probably wp-voting-contest.php or something. I don’t think it matters, really, as long as you put it in a file that’s included in your plugin. I put it in the main one because I wanted it to load right at the start.
Hope that helps!
Forum: Hacks
In reply to: How to display wp-editor word count?Seriously. Over 20% of the world’s websites use WP, yet the dev resources are still incomplete, vague and for the most part unhelpful.
Ah, well. 🙂
Forum: Hacks
In reply to: How to display wp-editor word count?Aaaand there it is. StackOverflow to the rescue, as usual:
Went and grabbed the TinyMCE download, hunted through the files for the plugin I wanted (plugins/wordcount). There’s a single plugin.min.js file in there. Put that in my plugin folder (at the root, just for testing).
Then added this code:
// Add wordcount plugin to TinyMCE for all instances. add_filter('mce_external_plugins', 'aa_register_tinymce_plugins'); function aa_register_tinymce_plugins() { $plugins = array('wordcount'); //Add any more plugins you want to load here $plugins_array = array(); //Build the response - the key is the plugin name, value is the URL to the plugin JS foreach ($plugins as $plugin ) { $plugins_array[$plugin] = plugins_url('plugin.min.js', __FILE__); } return $plugins_array; }And the word count appears. For multiple plugins, you’d put the whole of the tinymce download into your plugin folder and change the foreach line to look in the tinymce/plugins subdirs (each plugin has a plugin.min.js file):
$plugins_array[ $plugin ] = plugins_url('tinymce/plugins/', __FILE__) . $plugin . '/plugin.min.js';Job done. Phew. 🙂
Forum: Hacks
In reply to: How to display wp-editor word count?Further research: there’s a filter for adding plugins to TinyMCE.
Unfortunately (as usual), the Codex is completely unclear about any practical use of the thing, so I have no idea how to add “wordcount”. Searches online just bring back very complex code to add buttons or the simple code to limit buttons (like I’m already doing).
This is a great example of why WP is brilliant and sucks: you can do anything with it, but you have to already know how to do it before you look up how to do it. :\