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
0answers
25 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 ...
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 ...
6
votes
2answers
2k 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
21 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(); ...
1
vote
0answers
67 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
73 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
248 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
11 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
19 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
131 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
47 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
46 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
38 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
48 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
33 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
0answers
12 views

Inconsistent link coloring in WordPress editor

I am experiencing inconsistent color styling on <a> tags in the WordPress classic WYSIWYG editor. If I highlight the text in the link, the editor wraps the inner text in a <span> but if I ...
0
votes
1answer
15 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 ...
0
votes
0answers
37 views

How can I force Wordpress + React Router to soft 404 without modifying core? (So that it is crawlable by Google)

So I have been working on migrating one of my clients to a WordPress site. For the most part, the requirements of the site are pretty simple, but the site did need to have a fully custom faceted ...
2
votes
1answer
64 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
33 views

Why do plugins need to be deactivated to update Wordpress?

In the Wordpress update instructions, it is strongly instructed to deactivate all plugins before manually updating Wordpress' core. Why is that necessary ? What are the potential consequences if I ...
0
votes
0answers
88 views

Default style of a button in WordPress Gutenberg

I'm trying to change the default style of a button with the following code: <InnerBlocks template={ [ [ 'core/button', { text: __( 'Add text', 'xf' ), className: 'is-...
0
votes
0answers
29 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
54 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
0answers
75 views

Ajax Issue for Add Media (Not All Images Load)

I'm working on a website that has over 300 images, using WordPress 5.1.1 with Classic Editor enabled. In Media Library, I can view all the images since it uses pagination. However, when I click Add ...
0
votes
0answers
25 views

my theme mega menu & fronetend plugin menu restrict

i used MagPlus theme coded by themebubble.com it has got mega menu options on backend menu options. this options are disappear after activated wp user fronted pro plugin. mega menu is not working if ...
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?
2
votes
0answers
719 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
66 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
103 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
40 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
42 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
99 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
613 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
210 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
28 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
611 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
98 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
610 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
26 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
66 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
66 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
577 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
16 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
48 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)?
0
votes
3answers
46 views

Best way to salvage a very old WP site

I have a client who's in a situation with her website: her ex-husband owns the hosting company and won't let her have FTP or any other server access, she still has dashboard access, she wants to move ...
1
vote
1answer
2k views

Change Password Hint

I want to change the password hint on the password reset screen. Currently, it says "Hint: The password should be at least twelve characters long. To make it stronger, use upper and lower case letters,...
1
vote
1answer
104 views

How to contribute to WordPress Core using Tortoise SVN?

I am expecting step by step guide how to submit patch using Tortoise SVN because it is little bit unclear the documentation for me. For a example, it said, "Open the folder, and find the file you ...
3
votes
2answers
82 views

What CSS minifier does WP core use?

I did not see the minifier among the tools in https://code.trac.wordpress.org/browser/ . Is it in the repo somewhere? Or, what is it? (Note this question has been asked previously on Stack Exchange ...