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 vote
0 answers
17 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 ...
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 ...
user avatar
0 votes
0 answers
17 views

Is there a way to opt out of or block having the newest core themes installed on update? [duplicate]

We generally keep our custom theme in non-auto-update mode and one core WP theme in auto-update mode as an emergency backup as our only 2 themes in the wp-content/themes directory. If we had ...
user avatar
0 votes
0 answers
18 views

Disable "auto embed" feature when pasting text and links

I want to disable the auto embed feature of Wordpress, when pasting arbitrary text that includes links in Gutenberg. I tried this with something like: add_filter('allowed_block_types', '...
user avatar
  • 1
0 votes
0 answers
13 views

Should /wp-includes/js/* folder be blocked in robots.txt file for a WordPress website?

In my WordPress website. I am disallowing /wp-includes/js/* folder in the robots file. Is that bad? I use SEMRush to audit my site and it shows an error that a resource at the above location is being ...
user avatar
0 votes
0 answers
16 views

Create custom page to author.php

How can i add new pages to author page? normal url is like https://www.example.com/author/exampleUser i wanna make a settings page located in like this: https://www.example.com/author/exampleUser/...
user avatar
0 votes
0 answers
428 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 ...
user avatar
  • 608
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 ...
user avatar
0 votes
0 answers
28 views

Get the name WordPress default theme in the core

With this link https://api.wordpress.org/core/version-check/1.7 I get the latest version of Wordpress, now I need: Get the name WordPress default theme in the core, twentytwentyone. how? I tried https:...
user avatar
0 votes
1 answer
32 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 ...
user avatar
0 votes
0 answers
23 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 ...
user avatar
  • 11
0 votes
0 answers
19 views

Notice on core function

I have this weird error (I guess) since this morning in my logs : [23-Nov-2021 14:46:50 UTC] PHP Notice: Undefined offset: 3322309 in ..../wp-includes/class-wp-query.php on line 3275 Where the ...
user avatar
  • 114
1 vote
0 answers
19 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=...
user avatar
  • 11
0 votes
1 answer
84 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 ...
user avatar
  • 63
0 votes
2 answers
38 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 ...
user avatar
  • 101
0 votes
0 answers
32 views

How to override core/paragraph onChange handler

Below is the code, in this case it replacing the original core/paragraph with RichText and removes the original core/paragraph setting panel. How can I override only onChange handler of core/paragraph ...
user avatar
3 votes
0 answers
129 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 ...
user avatar
  • 131
1 vote
1 answer
39 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 ...
user avatar
0 votes
1 answer
131 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 = ...
user avatar
0 votes
2 answers
184 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 ...
user avatar
  • 27
0 votes
1 answer
140 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 ...
user avatar
  • 608
0 votes
1 answer
33 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 ...
user avatar
  • 3
2 votes
1 answer
294 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 = ...
user avatar
1 vote
1 answer
34 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.
user avatar
0 votes
0 answers
22 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 ...
user avatar
  • 128
1 vote
0 answers
27 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 ( '...
user avatar
  • 11
0 votes
0 answers
80 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 ...
user avatar
0 votes
1 answer
383 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. ...
user avatar
  • 615
0 votes
1 answer
116 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 ...
user avatar
  • 416
1 vote
1 answer
28 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: ...
user avatar
0 votes
1 answer
139 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. ...
user avatar
0 votes
1 answer
17 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 ...
user avatar
  • 348
0 votes
0 answers
36 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 &...
user avatar
-1 votes
1 answer
28 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 ...
user avatar
  • 113
0 votes
1 answer
128 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 // ...
user avatar
  • 376
0 votes
1 answer
54 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 ...
user avatar
0 votes
0 answers
66 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 ...
user avatar
0 votes
1 answer
191 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 ...
user avatar
  • 1,391
0 votes
1 answer
164 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 ...
user avatar
1 vote
0 answers
777 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 ...
user avatar
  • 11
0 votes
1 answer
128 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....
user avatar
0 votes
1 answer
384 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 ...
user avatar
  • 31
1 vote
1 answer
600 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:...
user avatar
  • 119
1 vote
0 answers
31 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 ...
user avatar
11 votes
3 answers
5k 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 (...
user avatar
2 votes
0 answers
520 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 ...
user avatar
  • 21
0 votes
1 answer
236 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, ...
user avatar
3 votes
1 answer
11k 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....
user avatar
  • 1,680
1 vote
4 answers
636 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 (...
user avatar
  • 376
0 votes
2 answers
248 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 - ...
user avatar
  • 279

1
2 3 4 5