Hot answers tagged

3

No, you don't need to escape hardcoded values. As I understand it, if the URL doesn't have an input via admin, it should be okay. Not necessarily. There's many more potential sources of potentially malicious (or just accidentally broken) output that need to be accounted for, such as: Translations. Query strings ($_GET) Cookies. WordPress filters. So ...


2

Not a direct answer, but two suggestions. First of all, get_last_numero does not necessarily return the highest number. It returns the last one. If you have full control over insertion then it will be no problem, but once you will do an import, or change things in the database manually or in other ways than the usual, you might introduce problems. So, in ...


2

wp_get_current_user() will never work in this hook, because, wp_logout action fires after user is logged out: session destroyed, cookies cleared and current user is set to 0. But wp_logout action recieves $user_id. I will give you a working example, because I do not familiar with your custom functions. //pass $user_id as argument function ...


2

Yes, there is a filter you can use — all_plugins: apply_filters( 'all_plugins', array $all_plugins ) Filters the full array of plugins to list in the Plugins list table. And here's an example which changes the description of the Akismet plugin: add_filter( 'all_plugins', 'my_all_plugins' ); function my_all_plugins( $all_plugins ) { // the & means ...


2

You need to also back up the database in addition to the plugins folder. Not only is information stored in the database about which versions of which plugins are installed, an updated plugin itself may make changes to its settings which is stores in the database. Without backing up both the database AND the plugins folder, you wouldn't be able to rollback ...


2

No. You should always backup FTP (in this case plugins folder could suffice) and database. Although many prominent plugins do not change the database on the update (and instead ask you to run them manually or schedule an automated event for that), you cannot be sure that every plugin does it like this. Personally I prefer running the updates on a staging ...


2

As @kero noted, your best option is to contact the developer and ask if they are open to including an appropriate hook - what you need is a filter to allow customization for the value of $allowed. However, barring that, one potential (albeit not perfect) solution is to ignore updates for the plugin. You can do that as follows: function filter_plugin_updates(...


1

I have the same problem and just find out that you need to extend from. \ElementorPro\Modules\ThemeBuilder\Skins\Posts_Archive_Skin_Cards rather then \ElementorPro\Modules\Posts\Skins\Skin_Cards


1

If anybody stumbles across this old question: In my case, the reason was, I gave the site at localhost a name without a top-level domain. e.g. "mysite" (instead of "mysite.com"). So, WordPress assumed the "From" address to be "wordpress@mysite". Phpmailer (which is called by wp_mail) then raised the error: "...


1

In the foreach you need to check each item for its product id and compare it to the targeted id $order = new WC_Order($order_id); $item_quantity = 0; $targeted_id = 14988; foreach ($order->get_items() as $item_id => $item) { // check if current item (product) id is equal to targeted id if ($item->get_product_id() == $targeted_id) { ...


1

There are several membership plugins or customer area plugins. MemberPress is an easy one to setup.


1

I would change the CSS for that particular heading. Sth like this might help: h3.elementor-heading-title > a { copy style of .elementor-heading-title here; } If you have trouble finding the style in question, just ask here. :)


1

If you are ok to use a plugin for this, I think WP CLient Reports is exactly what you are after. It can create periodical reports for you about plugin, theme or core updates, as well as post/pages updates, etc.


1

Yes, you need to search a bit for the build steps. You want Getting Started with Code Contribution: After installing Node, you can build Gutenberg by running the following from within the cloned repository: npm ci npm run build Note: The install scripts require Python to be installed and in the path of the local system. This might be installed by default ...


Only top voted, non community-wiki answers of a minimum length are eligible