Questions tagged [core]

Core is the conventional name for WordPress as it is distributed, so excluding all plugins and themes (even those by Automattic or WordPress.org itself). In principle, all questions on this site are about the possibilities of core.

Filter by
Sorted by
Tagged with
0 votes
1 answer
21 views

Allowed blocks for core/column

I'm new to the world of Gutenberg blocks. A customer has a special need to restrict the allowed blocks that can be used inside core/column block. The editor should only be able to select a small part ...
Acer82's user avatar
  • 1
0 votes
1 answer
53 views

Disable creating sort index SELECT post_modified_gmt

strangely my theme doesn't have the function that generates queries like this SELECT post_modified_gmt FROM wp_posts WHERE post_status = 'publish' AND post_type IN ('post', 'page', 'attachment') ORDER ...
Công Tử Huyết's user avatar
0 votes
1 answer
36 views

Best approach to change mobile background image and adding its class

I have extended core/group block to add different background image when its being viewed on smaller view port. I would like to know what will be best approach to add class name here which I did in my ...
up1512001's user avatar
0 votes
0 answers
17 views

Is wordpress core still jquery-dependant?

As per the title. I don't know where to find this information but, is wordpress Core still jquery dependant? I generally use my own custom themes, so I do not need jquery for the themes, and I can ...
Luca Reghellin's user avatar
0 votes
0 answers
19 views

remove_function method removing next priority action too while removing current priority

I found a strange behaviour from the WP core related to remove_action, add_action('my_custom_hook', 'mycustomfunc2',99); add_action('my_custom_hook', 'mycustomfunc3',100); function mycustomfunc1(){ ...
amrtansh's user avatar
0 votes
0 answers
14 views

What are scheduled callbacks?

I was taking a look at the inner workings of the Cron System, and found something odd: apparently, you can set a callback to event recurrence schedules. However, I can't find any documentation on that ...
Buzu's user avatar
  • 101
0 votes
1 answer
36 views

How to disable publish_future_post auto add wp_options cron

My website >> database >> wp_options >> option_name >> "cron" field total size 31GB (I was so surprised @@) After checking i see a lot of publish_future_post fields ...
Công Tử Huyết's user avatar
0 votes
0 answers
65 views

What triggers WordPress automatic updates? (revisited)

I'm trying to ascertain what triggers WordPress automatic updates. (focusing core-updates for now, not plugin/theme at this time.) How To/What triggers a Wordpress auto update? The 8 year old question ...
mmrn's user avatar
  • 101
0 votes
1 answer
224 views

getEntityRecords/useEntityRecords: How to use CPT metadata?

I use getEntityRecords as described in the official data API tutorial (https://learn.wordpress.org/lesson/retrieving-wordpress-data-records/). I.e.: const [searchTerm, setSearchTerm] = useState( ''...
gresch's user avatar
  • 111
0 votes
1 answer
579 views

PHP Warning: Constant WP_CONTENT_URL already defined

I am getting the following errors while upgrading WordPress using Composer. PHP Warning: Constant WP_CONTENT_DIR already defined in /var/www/html/my-website/wp-config.php on line 112 PHP Warning: ...
tek bhatt's user avatar
2 votes
1 answer
234 views

WordPress internal functions : why not use them?

When I was looking at the latest WP 6.3 release note, I saw that they improved performances on the _wp_array_get() function and I thought: That's a sweet function that I would like to use (I had a ...
Tim's user avatar
  • 516
0 votes
1 answer
34 views

Is there any resource to explain all decisions made on WordPress?

For example, <br>, <ol type="a"> don't work. Instead of being frustrated each time a feature that should work doesn't work, annoyed that it's an intentional decision, and ...
Ooker's user avatar
  • 332
0 votes
0 answers
12 views

Wordpress Includes mejs 404 error

I have an issue with NewRelic reporting a number of 404 errors which all stem from the WP includes mejs Example of the 404 error site.com/mejs.hebrew & site.com/mejs.dutch Has this occurred for ...
WilsonP's user avatar
0 votes
1 answer
38 views

WPML is blocking WP core update

I am tryin to update the core of Wordpress to 6.2 from the site desktop for a company whose WPML contract has expired. This is the error I get from WP: "WPML String Translation is trying to write ...
IvanSanczewski's user avatar
0 votes
1 answer
245 views

When do we use wp_slash?

I read the doc but couldn't understand when I need to use wp_slash. It says... This should not be used to escape data going directly into an SQL query. Does it mean if I'm duplicating a post, I do ...
ratib90486's user avatar
0 votes
1 answer
419 views

Critical Error when editing menu

I am having an issue debugging what appears to be a WP core issue. I am observing the following behavior when attempting to edit menus, see below for context I checked the error logs and the ...
grzybowski1911's user avatar
0 votes
2 answers
440 views

change div text and link for logged in users

this question was already similar asked but I don't find a way to get it working without using a plugin. So basically I got a text on my homepage which says login, so it's a normal text which i want ...
Alex K's user avatar
  • 1
3 votes
1 answer
55 views

Where can I find the definitive list of core blocks in html form

I have been to GitHub, but the documentation there is not what I'm looking for. I'm looking more this: <!-- wp:post-featured-image /--> <!-- wp:post-title /--> <!-- wp:spacer {"...
breadwild's user avatar
  • 341
0 votes
0 answers
701 views

Does wp_safe_redirect() no longer works?

Inside index.php I used wp_safe_redirect to redirect users to the main global page if users write a false url. I have 1 domain and three subdomains. These subdomains refer to php files and not to ...
imagIne's user avatar
  • 53
0 votes
0 answers
349 views

After a while attachment meta data is missing "sizes" data

We like to use custom image sizes for custom WP themes. This way, we can provide appropriate images for the custom elements and we can ensure that images don't load too large or too heavy. Now we've ...
braam's user avatar
  • 1
0 votes
1 answer
73 views

How can I save the selected page in the dropdown after anyone clicks on Save Changes?

I am trying to build a function for my plugin. Now, I am displaying the dropdown of all available pages. What I want is for when anyone chooses a page from there and clicks on Save Changes, the page ...
Rajin Sharwar's user avatar
1 vote
0 answers
50 views

Add image or video tags to WP Sitemap

Is there a way to add tags to the default WP core generated sitemaps other than four default ones ('loc', 'lastmod', 'changefreq', 'priority') WP allows using the wp_sitemaps_posts_entry filter? For ...
gan's user avatar
  • 211
0 votes
1 answer
505 views

PHP Fatal error: Uncaught Error: Cannot unset string offsets when trying to upload any file to media library

When trying to upload files to the Wordpress media library I encounter the following error: Unexpected response from the server. The file may have been uploaded successfully. Check in the Media ...
victorbrnk's user avatar
0 votes
1 answer
27 views

Admin submenu issue with PHP not detecting two strings as equal

I am adding a submenu page as follows: add_submenu_page( $slug, __('Categories','acs'), __('Categories','acs'), $cap, 'edit-tags.php?taxonomy=acs-field-group-category&post_type=acs-field-group' ); ...
Álvaro Franz's user avatar
1 vote
1 answer
101 views

When is the wp-mail.php in the WP root requested?

I see there is this wp-mail.php file which seems to be a feature to open a mailbox via pop3 and grab a post to publish it. But I wonder, when is this file being executed? It seems to not be used ...
Álvaro Franz's user avatar
0 votes
1 answer
39 views

Is the information returned by get_bloginfo( 'version' ) always the same as the one in version.php?

In the WordPress Core, I see some cases doing: $wp_version = get_bloginfo( 'version' ); And other cases doing: // include an unmodified $wp_version include( ABSPATH . WPINC . '/version.php' ); That ...
Álvaro Franz's user avatar
1 vote
0 answers
56 views

Wordpress Loop and $post

I decided to take a closer look at how WP works and ran into this question. I see that when WP is loaded, the wp() function is triggered, which will parse the request and get data from the database in ...
Alex's user avatar
  • 11
4 votes
6 answers
4k views

Updating WordPress core with zero downtime - I mean zero

I have a critical website which is under version control. When I update the core WordPress files I do so locally, then commit the changes. When I do that the live site (obviously) does not even ...
mayersdesign's user avatar
0 votes
0 answers
1k views

Trying to get property 'ID' of non-object in /wp-includes/class-wp-query.php on line 4044

I've made a custom plugin, but somehow I've made something that fills up my debug.log with garbage. It looks a bit like something this is faulty in the WordPress-core, but I'm not 100% sure. Here is ...
Zeth's user avatar
  • 858
1 vote
1 answer
19 views

Show notice just below the search form on the themes page

I want to show a notice on the theme installation page. I have used the admin_notices hook but it is showing the message above the search box. I want to print the notice at the place of a black line ...
void String's user avatar
0 votes
1 answer
231 views

Gutenberg button removed on save if its empty

I have buttons with no text in my design which has icons designed in :before of the a tag. It was working fine with the WP 5.5, but now I have updated in live and when I save any page it removes all ...
Jenno Richi Benat's user avatar
0 votes
0 answers
32 views

wordpress wp-admin/includes/shema.php file has been modify alone

I have a problem, a file from wp-admin has been modified alone or after deactivated/activated my own plugin . I never modified any files inside wp-admin, I don't know why now. I am currently creating ...
imagIne's user avatar
  • 53
1 vote
0 answers
33 views

approach to pass additional parameter in post URL

I am trying to automatically pass an additional parameter whenever the post is saved as Draft or Published. When a post is saved as Draft or Published, the URL is updated to /wp-admin/post.php?post=...
trevor's user avatar
  • 11
0 votes
1 answer
507 views

wp_insert_post always returns 0 on one site, extensive testing done, can't get to the bottom

I have two sites. One, a fresh install, the other an existing site with errors/white screen of death on the wp-admin/post-new.php screen. I've disabled all of the active plugins, and enabled a default ...
Gary's user avatar
  • 63
0 votes
2 answers
63 views

Updating wordpress from my Linux distro's repository

I installed wordpress with apt, which ties in a lot of directories, so I suspect that using the built-in core update tool will break the installation; but wordfence constantly demands that I update ...
Jick's user avatar
  • 101
3 votes
0 answers
366 views

No longer able to attach S3 bucket files to emails being sent by WordPress due to PHPMailer security update

I've been trying to track down why my s3 bucket files are no longer being attached to automated emails being sent out by WordPress (using the Gravity Forms Entry Automation plugin). I've been able to ...
MT3's user avatar
  • 131
1 vote
1 answer
43 views

WP Core: Where are terms populated for the admin edit screen?

I am trying to understand how the Admin Tables are populated (for posts, users, plugins...). With Terms/Taxonomies I am confused. In the /wp-admin/edit-tags.php file everything is normal until we ...
Álvaro Franz's user avatar
0 votes
1 answer
476 views

Avoiding ACF get_field and returning to core Wordpress function

function slb_subscriber_column_data( $column, $post_id ) { // setup our return text $output = ''; switch( $column ) { case 'title': // get the custom name data $fname = ...
WordCent's user avatar
  • 1,867
0 votes
2 answers
2k views

Use wp_head hook on template page

I try to use the hook wp_head on a template page but this does not work add_action('wp_head', 'to_head'); function to_head(){ //do stuff } I placed this code on a template part what is called by ...
Jop's user avatar
  • 27
0 votes
1 answer
504 views

Timezone is wrong when picking city (Copenhagen)

The timezone-setting (in 'Settings' >> 'Generel' >> 'Timezone'), seems to be ignored. I've set it to be 'Copenhagen' (value: Europe/Copenhagen). But the servers time is still 1 hour ahead ...
Zeth's user avatar
  • 858
0 votes
1 answer
118 views

Login cookies blocked after customizing hashing method

I get the following error when trying to login: Error: Cookies are blocked due to unexpected output. I customized the wordpress core functions wp_hash_password() and wp_check_password() to use SHA1 ...
Jan's user avatar
  • 3
2 votes
1 answer
930 views

Question about the template-loader.php file

I am studying the WP code and have a doubt regarding the end of the /wp-includes/template-loader.php file, which handles the template that must be loaded for a certain URL request. if($template = ...
Álvaro Franz's user avatar
1 vote
1 answer
70 views

What is the WP_Internal_Pointers core class?

The documentation does not explain it very well and I would like to understand what it is and why it exists.
Álvaro Franz's user avatar
0 votes
0 answers
29 views

Error while localizing communityEventsData in script-loader.php

I'm getting an error in my logs: NOTICE: PHP message: PHP Warning: Cannot assign an empty string to a string offset in /usr/share/nginx/wp/wp-includes/class.wp-scripts.php on line 492 So I got the ...
Elkrat's user avatar
  • 138
1 vote
0 answers
60 views

Use register_setting() in a loop

I try to use the function register_setting() in a loop but the settings are not set. This is my code <?php add_action( 'admin_init', function() { $registerSettings = array ( '...
Bert's user avatar
  • 11
0 votes
1 answer
196 views

Internal Redirections?

I'm facing too many redirections issue with the REST API, and only with it, GUI works like a charm. I used cloudflare as a CDN. When I disable Cloudflare, REST API is working, else not. I was testing ...
Aurélien Benoit's user avatar
0 votes
1 answer
867 views

Update a core option from plugin settings page

I'm trying to update a core WordPress option, image_default_link_type, from my plugin's settings page, but WordPress is refusing to update it. The options registered by the plugin itself are updated. ...
Sean's user avatar
  • 647
0 votes
1 answer
204 views

Rebuilding core image block

I am trying to rebuild core/image block to add extra link in the caption, which would be a link to the extended description of object in the image on another page. This requires both modifying block ...
Lovor's user avatar
  • 901
1 vote
1 answer
33 views

Check for security updates

Is there any option to check all my plugins, core and themes on a website for security issues? Example: For the Wordpress core I can check my current Version: get_bloginfo( 'version' ), for updates: ...
user191642's user avatar
0 votes
1 answer
357 views

IP Address Whitelist to Allow WordPress Core Auto Updates

I'm working on a site based on a server with quite strict firewall rules. It won't allow anything running on the site to connect an external server unless its IP address is explicitly whitelisted. ...
tw8sw8dw8's user avatar

1
2 3 4 5