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
1answer
16 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 = ...
0
votes
2answers
47 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 ...
0
votes
1answer
25 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 ...
0
votes
1answer
11 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 ...
2
votes
1answer
30 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 = ...
1
vote
1answer
14 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.
0
votes
0answers
9 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 ...
1
vote
0answers
17 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 ( '...
0
votes
0answers
35 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 ...
0
votes
1answer
29 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. ...
0
votes
1answer
56 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 ...
0
votes
0answers
8 views

how do i check which products do not have external image attached

i have uploaded 2500 products to wordpress. each product has mutliple variations. i uploaded a csv that contained a list of tite, and cdn urls. now the majority of the products have a cdn url and ...
0
votes
0answers
277 views

Cross-Origin Read Blocking (CORB) blocked cross-origin response

I'm experiencing a strange behavior on one of the Wordpress sites I maintain (https://www.delscookingtwist.com/) whereby a video won't play. All that shows up is a black rectangle with the controls (...
0
votes
0answers
151 views

Extending core Gutenberg block - Apply dynamic style in editor from block props

The docs lays out how to apply styles in the front end via hook: function addBackgroundColorStyle( props ) { return lodash.assign( props, { style: { backgroundColor: 'red' } } ); } wp.hooks....
0
votes
0answers
10 views

Combine no class shipping with class shipping

I have the following case which I'm trying to solve. Most of my items I'm selling on my Wordpress site are no class specified and I use the following formula to calculate shipping: 10 + ( 9.99 * [qty] ...
0
votes
0answers
25 views

modifying default quote block HTML output

I would like to change HTML which "qoute" block produces: instead <blockquote> <p>text</p> <cite>text</cite> </blockquote> I would like this HTML ...
1
vote
1answer
25 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: ...
0
votes
1answer
55 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. ...
0
votes
1answer
16 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 ...
0
votes
0answers
98 views

Mocking @wordpress/data `useSelect` hook

I am trying to use useSelect. I want to test The string pass select is video-store I am actually calling getVideoCollection However I am getting following error. TypeError: useSelect....
0
votes
0answers
22 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 &...
-1
votes
1answer
25 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
17 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
66 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
21 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
45 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
45 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
1answer
61 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
388 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
75 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
203 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
262 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
30 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 ...
11
votes
3answers
4k 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 (...
2
votes
0answers
399 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 ...
0
votes
1answer
201 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, ...
2
votes
1answer
6k 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....
1
vote
4answers
252 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
186 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
89 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
346 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
62 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
1answer
17 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
74 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
49 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
297 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
28 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?
7
votes
0answers
3k 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
155 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
908 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
2 3 4 5