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
-1
votes
1answer
22 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 ...
0
votes
0answers
12 views

Disable wp-install file?

I have a unique situation. Whenever I visit my site moments after it has crashed, I'm redirected to the install wordpress page. After about a minute, my homepage redirects me to my actual site and ...
0
votes
1answer
16 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 // ...
0
votes
1answer
9 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 ...
0
votes
0answers
30 views

Cannot update WordPress Core via admin dashboard

I have a WP multisite that I am no longer able to run core updates via the admin dashboard. It used to work just fine back in the WP 4.* days, but stopped working the last couple of updates and the ...
0
votes
1answer
7 views

Can mediaelement-and-play core JS be dequeued?

I'd like to understand what is the purpose of the WordPress core javascript file /wp-includes/js/mediaelement/mediaelement-and-player.min.js I am asking that because it weighs 136KBytes and I'd like ...
0
votes
0answers
16 views

WP-CLI: detect altered core files and restore them automatically

I know that there is a command to verify the integrity of the core files: $ wp core verify-checksums In case a file is corrupted or altered, is there any WP-CLI command to automatically restore all ...
1
vote
0answers
22 views

How to display post categories within the Latest Posts block?

I'm trying to display the category/categories from each post within the Latest Posts block in the WordPress editor. This post seems to provide some solutions, however I am unsure how to use this ...
0
votes
1answer
45 views

How to get theme's info from wordpress.org/themes using api.wordpress.org?

i am trying to get the html code of the description of a few themes from WordPress, i know this is possible to achieve in codecanyon, but can't get the hang of it in wordpress.org, i've read the api....
0
votes
1answer
52 views

the_posts_pagination() function returns missing page numbering on some blog pages

I have a very strange issue that I am struggling to debug without amending the core function. On page 1 of the blog archive it shows page numbers: 1, 2, 4 (page 3 is missing). On page 2 and 3 the ...
1
vote
1answer
105 views

Huge debug.log because of “undefined offset in media.php”

Recently debug.log (WP 5.3.2) grew to 17GB because of tons of entries like this: [17-Jan-2020 16:29:01 UTC] PHP Notice: Undefined offset: 1 in /wp-includes/media.php on line 790 [17-Jan-2020 16:29:...
1
vote
0answers
28 views

Isn't requiring a file before it's loaded by WordPress itself a symptom of bad code? [closed]

There's a lot of if( !function_exists(... { require ABSPATH . '/file.php in the industry. We didn't crash, the world still lives, yet I wonder - isn't this one of the worst things you can do in an ...
10
votes
2answers
3k views

WordPress 5.3 update causes media library file upload to break - Cannot convert undefined or null to object

So after updating to WP 5.3 I can no longer use the file upload to choose files to add. I get the following error: Uncaught TypeError: Cannot convert undefined or null to object at g.cleanup (...
0
votes
0answers
41 views

Where does get_post_types() get the data from?

I was going through the WP Core trying to understand how URLs are parsed to SQL query . So , I found in wp-includes/class-wp.php , in the method WP::parse_request() a call is made to get_post_types(); ...
2
votes
0answers
191 views

Gutenberg List Extension Block

I'm trying to extend the default Gutenberg unordered list that renders like this; <ul> <li>Item 1</li> <li>Item 2</li> </ul> To something like this when ...
-1
votes
1answer
118 views

What is a rock solid development and deployment workflow? [closed]

I am looking for a modern, reliable, solid rock development workflow for Wordpress, but most articles only explain individual parts. Some talk about very specific aspects like the way of deployment, ...
1
vote
1answer
2k views

How to remove X-Frame-Options: SAMEORIGIN" from WordPress?

I want to temporarily remove X-Frame-Options: SAMEORIGIN and need to allow all domains. I have already tried the following ways. Removing send_frame_options_header from ./wp-includes/default-filters....
0
votes
0answers
12 views

Are there any “sub” processes or maintenance tasks that lend themselves to being shardded off onto a separate server?

I'm looking at ways to spread the processing demand of WordPress around two or more low end hosting accounts or servers. What I wanted to know is if there are any "sub" processes or maintenance tasks ...
0
votes
2answers
34 views

Remove annoying WP Adminbar CSS

I am trying to remove the annoying WP Admin bar css. <style type="text/css" media="screen"> html { margin-top: 32px !important; } * html body { margin-top: 32px !important; } @media screen and (...
0
votes
2answers
139 views

Wordpress Heartbeat API cannot parse data

I want to use WP-API heartbeat to open a connection to two displays and have them reflect what the other is saying with each send and tick. It used to work when the heartbeat API came out in 3.6 - ...
0
votes
0answers
61 views

wp-cli core install --skip-email and --skip-config flags not working on MAMP unknown parameter

This command wp core multisite-install --url="dev3.XXXXXXX.wp" --title="XXXX" --admin_user="XXXXXadmin" --admin_password="XXXXX123" --admin_email="XXXX@XXXX.com" --skip-email --skip-config Creates ...
0
votes
1answer
179 views

wp-cli core install unknown: fatal: file /etc/postfix/main.cf: parameter mail_owner: user postfix has same user ID as _postfix

I'm trying to setup two wordpress virtual hosts on my macbook using a shell script composer and wp-cli. The first virtual host has been working perfectly. When I run the script for the 2nd virtual ...
2
votes
1answer
55 views

How does WP detect format type (and can I make use of this)?

When I make a post with a theme that supports (all) post formats, WordPress will suggest the format type it thinks best fits my post. How does it do this? Is it possible to leverage this in, say, my ...
0
votes
0answers
174 views

How critical are Underscore.min.js, wp-auth-check.min.js, heartbeat.min.js and jquery.js if blocked by CSP?

The following files are blocked from loading when the following CSP is implemented. Header set Content-Security-Policy default-src 'self' 'unsafe-inline' https://fonts.googleapis.com; script-src '...
0
votes
0answers
56 views

wp_delete_attachment returning successfully, deleting all DB data, but NOT deleting files

I digged into wp_delete_attachment here https://core.trac.wordpress.org/browser/tags/5.2.1/src/wp-includes/post.php#L5450 , it calls wp_delete_attachment_files wp_delete_attachment_files returns ...
0
votes
1answer
16 views

Integrate separate web app inside wordpress [closed]

I want to integrate a wordpress installation with a third party application, it's an online football game simulation. Is it possible to wrap it inside my wordpress installation, but with a separate ...
2
votes
1answer
65 views

What is the criteria for pluggable functions?

Why are certain functions pluggable (overrideable) in WordPress core and others not? (I note on the Codex page regarding Pluggable Functions no more are to be added in favour of filter usage.) But ...
0
votes
0answers
38 views

How wordpress core include search.php with $_GET['s']?

I want to include custom_search.php when there is $_GET['my_s']. As you know, if we type on a search field, WordPress core includes search.php file because WP Core get $_GET['s'] as query var. How ...
0
votes
2answers
115 views

Is the root index.php file part of the Core?

The contents of the /index.php is as follows: /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define('WP_USE_THEMES', true); /** Loads the WordPress Environment ...
0
votes
2answers
27 views

Where can I see all changes for a new WordPress version?

Could someone tell me where I could find detailed information about what has beend changed/improved in a new WordPress major/minor version? Maybe some kind of changelog or something?
3
votes
0answers
1k views

Understanding SHORTINIT with Wordpress 5

What I am trying to achieve I am looking at using Wordpress decoupled, and most tutorials and guides go into detail on using the Rest API. Recently, I discovered the SHORTINIT option to load a very ...
1
vote
1answer
90 views

How to overwrite / extent wordpress function is_email

so wordpress' core isn't really up to date with email allowances of unicode domains. Even simple special characters like the german umlauts (äÄöÖüÜß) aren't allowed in the domain part of the name. So ...
0
votes
1answer
384 views

Storing WordPress Media Library Uploaded files onto a separate domain

We are looking forward to offload assets from our website (60GB onto a 8TB/mo accessed website), to a separate webserver that will be there only for serving images from a separate domain. I know that ...
-1
votes
1answer
61 views

explanation for activate_plugin function in wordpress core

This function is in plugin.php file in wordpress core. I read the code and didn't get quietly what does it do. Can anyone give some explanation for this function?
1
vote
3answers
47 views

How do action and filter hooks understand where to look for the core function that we hooked our function to them

I want to know how does WordPress core files handle the relationship between module and core of the WordPress? We all know it uses add_action() and add_filter() to manipulate data according to our ...
0
votes
1answer
115 views

Who updates the wp-admin/core file?

I can see it's a CDN file and I can't access it. My security plugin alerted me that there had been a modification to the wp-admin/core file, but I didn't change anything. I haven't updated to 5.0 yet. ...
0
votes
0answers
897 views

“Conditional query tags do not work before the query is run. Before > then, they always return false. ”

I'm getting the following error Notice: is_tax was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging ...
1
vote
2answers
314 views

How to override default Wordpress core language file

I am experiencing a small problem and I have tried several solutions, but none of them has worked unfortunately. Perhaps somebody has a clue why :-) I am using the Syntax theme from Automattic which ...
0
votes
0answers
33 views

Why does DROP TABLE-ing the `wp_options` reset my user session?

If I do: global $wpdb; $wpdb->query("DELETE FROM wp_options"); Suddenly, I'm logged out. But how come? I thought all sessions are kept locally, surely, a reference to my session must be present ...
5
votes
3answers
873 views

register_post_status - show_in_admin_all_list & show_in_admin_status_list does not affect query

In the register_post_status, I've already disabled show_in_admin_all_list & show_in_admin_status_list for my custom status my_hidden_status However, from the query log the post_status ...
0
votes
2answers
143 views

Why does my hand-written plugin installer fail to find `request_filesystem_credentials`?

I'm trying to write a plugin installer, akin to TGMPA, but just for its core functionality of actually installing the plugin and nothing more. I've identified that Plugin_Upgrader is what I need and ...
0
votes
2answers
40 views

How to wait for Wordpress Core to load when writing OOP?

I want to create a helper redirect function that looks like the following: /** * Just an example of using redirect() */ public function validate_something() { if (1 == 0) { $this->...
0
votes
2answers
782 views

Override has_post_thumbnail function

Is there a way to alter/change core has_post_thumbnail function? I need to check folder on server with images first before code looks for post image attachment. I see lots of filters to change image ...
1
vote
0answers
37 views

How to find out where the data.model is?

I am trying to figure out why the URL of my media library items isn't matching what is in the database, so I went to search where this data comes from. So I opened wp-includes/media-template.php and ...
0
votes
1answer
76 views

Custom Wordpress Core upgrade through wp-cli

I'm trying to do a custom wordpress core upgrade through wp-cli, theres an GUI upgrade hang issue in kubernetes when AWS EFS storage is used. For me wp core upgrade works great. I need somekind of ...
0
votes
1answer
89 views

Is it possible to disable html code error auto fixing feature by wordpress 4.9.1?

I'm on Wordpress 4.9.1 and there's this new feature that detects HTML error and auto fixes the errors when updating the page. Is it possible to disable this feature? The error is false positive since ...
-1
votes
2answers
751 views

What is the point of new confirm admin email process?

I just noticed this, in 4.9.1 don't know when it started but not in 3.9. When I went to change my admin email, I saw this: It used to be: Can someone point me to the changelog for this? This seems ...
0
votes
1answer
17 views

getting notifications about updates only in the “core” page

I run a few WP sites and keep track of updates on a daily basis. Normally, I go into the Plugins page and check if there are updates to the installed plugins accordingly. Lately, I've found out that ...
0
votes
1answer
55 views

Location of customizer Menu panel core code

Where can I find the core code for the Menu customizer panel? I want to do something that looks almost exactly like that, so I want to rely on the core code for it (I want to create a panel in which ...
0
votes
1answer
42 views

How does WordPress get the upgrade URL?

Can anyone point me to the location in the code where WordPress gets the core update url (eg: https://downloads.wordpress.org/release/en_AU/wordpress-4.8.2.zip)?