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
51 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
227 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
32 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
  • 330
0 votes
0 answers
11 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
31 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
118 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
0 answers
26 views

Remote database access on another wordpress site's custom post type

Firstsite.com secondsite.com both are Wordpress site and firstsite's data I want to fetch on my secondsite's custom post type template. Secondsite.com has it's own database so I want to use both on ...
Puneet's user avatar
  • 37
0 votes
1 answer
213 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
171 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
0 votes
0 answers
17 views

Set link dialog to open in blank by default

I'm trying to find a way to set the link option to open in a new window by default. I found this clever plugin but it is outdated. https://github.com/whyisjake/new-tab-always/blob/master/new-tab-...
Josh408's user avatar
  • 11
3 votes
1 answer
51 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
  • 319
0 votes
0 answers
416 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
  • 45
0 votes
0 answers
119 views

What is responsible for triggering "robots-template.php" file or "wp_robots_noindex()" core function out of it?

tl;dr: What event, scenario or situation can: Trigger execution of the core wp_robots_noindex() function (from the wp-includes\robots-template.php file) or Cause adding <meta name='robots' content=...
trejder's user avatar
  • 322
0 votes
0 answers
205 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
68 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
37 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
0 answers
25 views

Hook or function to check if performing a WP Core update?

I'm trying to find a way to detect if WP is actively performing a core update. The use-case is a development server where I break things regularly and coded two "emergency reset" procedures ...
John Patrick Hayden's user avatar
0 votes
1 answer
242 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
26 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
80 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
36 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
52 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
3 votes
6 answers
3k 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
  • 818
1 vote
1 answer
17 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
165 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
28 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
  • 45
1 vote
0 answers
22 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
385 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
56 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
310 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
40 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
415 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,827
0 votes
2 answers
1k 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
394 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
  • 818
0 votes
1 answer
101 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
767 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
56 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
  • 128
1 vote
0 answers
54 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
0 answers
151 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
732 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
189 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
  • 861
1 vote
1 answer
32 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
281 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
0 votes
1 answer
20 views

How to edit the <body> Tags within the image file URLs?

At present, my image files appear within the following URL structure: www.example.com/wp-content/uploads/year/month/image-file-name.jpg These image files, contain the following Body Tag <body ...
Craig's user avatar
  • 358
0 votes
0 answers
97 views

How to change current category to another in wordpress

I am new to PHP. Please help me to achieve the below scenario. I am trying to achieve this from the last 3 days. I've two categories in my WordPress dashboard named "Available (id:3)" and &...
sajeergraphix's user avatar
-1 votes
1 answer
56 views

What is the first action or filter executed by wordpress?

To mesure performance of a wordpress website i need what is the first filter or action executed by wordpress ? it seems that index.php is the input file of server, there is a way to add a global time ...
Gogo's user avatar
  • 113
0 votes
2 answers
225 views

Load WordPress core but with specific plugins

I am looking for a way to create a custom PHP file, where WordPress core is loaded, but only with specific plugins activated. <?php require_once '../../wp-load.php'; // load specific plugins // ...
FooBar's user avatar
  • 424
0 votes
1 answer
97 views

How can precision be improved for the debug log timestamp?

Sometimes, I write info to the debug log to diagnose problems. While working on a performance problem, resolution to hours:minutes:seconds is not enough. I'd like to get to milliseconds, but haven't ...
Bob Easton's user avatar

1
2 3 4 5