Skip to main content

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
0 answers
25 views

Add checkbox field to core/embed

I want to add checkbox to core/embed, I ahave tried many solutions , non work for example , one of my essays Update : addng any field would be appreciated wp.hooks.addFilter( 'blocks....
ahmed ch's user avatar
0 votes
2 answers
52 views

Is it safe to update wp-includes/certificates/ca-bundle.crt manually?

I see that wp-includes/certificates/ca-bundle.crt was last updated in 2020. https://curl.se/docs/caextract.html has implemented numerous updates since then. Can I overwrite WP's ca-bundle.crt?
MonkeyZeus's user avatar
0 votes
1 answer
31 views

How to get the post title inside a custom block in a loop? block.js

I have created a custom post type and I want to create blocks that display its values. To start with, I created a placeholder that gets replaced with the correct values using PHP. Everything works as ...
Ghiath Sardast's user avatar
0 votes
1 answer
100 views

Add Imports to Existing WordPress Import Map

How can imports be added to the existing WordPress import map? Preparing the Module I have a JavaScript module threeDTest.js which is enqueued using a PHP short-code (set to run everywhere): ...
Dave's user avatar
  • 11
1 vote
1 answer
50 views

Add independent connections for reading and writing to the database in WordPress

I want to add a read/write separation to my database in WordPress, to optimize queries. I do it as follows (with a MU-Plugin): class Custom_Read_Write_DB extends wpdb { public $read_connection; ...
Álvaro Franz's user avatar
1 vote
0 answers
66 views

Extend WordPress Gutenberg core/navigation-link

Hey folks So Im pretty new to this react + php in wordpress and I found one article where it showed how to extend a core block, which works fine for group and some basic block but When i tried to ...
DevopsRedefined's user avatar
0 votes
1 answer
94 views

is_embed and is_search called incorrectly by wp_robots filter

I've been getting the below errors for quite some time now, but I haven't been able to figure out the root cause. Notice: Function is_embed was called incorrectly. Conditional query tags do not work ...
CragMonkey's user avatar
0 votes
0 answers
48 views

How to schedule Automatic Wordpress Core and specifics Plugins updates for specific time a day

Nowadays we are doing manually updates every 2 weeks in a test server, we test all plugins and if everything is ok. We deploy same file changes with Git in production server. Sometime we found some ...
Carlos's user avatar
  • 101
0 votes
1 answer
21 views

Where in WordPress core is the method or function that reads the style CSS header?

I'm looking for the method or function that reads the style.css file header for the theme.
Matthew Brown aka Lord Matt's user avatar
0 votes
0 answers
157 views

how can I remove all default settings in Gutenberg blocks? example core/button

I’m expanding the capabilities of the default Gutenberg block (core/button) and want to hide all the default settings. This code helps to hide all settings except 1 //functions.php function ...
YuriiMy's user avatar
0 votes
1 answer
141 views

Allowed blocks for core/column

I'm new to the world of Gutenberg blocks. A customer has a special need to restrict the allowed blocks that can be used inside core/column block. The editor should only be able to select a small part ...
Acer82's user avatar
  • 1
1 vote
1 answer
189 views

Disable creating sort index SELECT post_modified_gmt

strangely my theme doesn't have the function that generates queries like this SELECT post_modified_gmt FROM wp_posts WHERE post_status = 'publish' AND post_type IN ('post', 'page', 'attachment') ORDER ...
Công Tử Huyết's user avatar
0 votes
1 answer
64 views

Best approach to change mobile background image and adding its class

I have extended core/group block to add different background image when its being viewed on smaller view port. I would like to know what will be best approach to add class name here which I did in my ...
up1512001's user avatar
0 votes
0 answers
38 views

Is wordpress core still jquery-dependant?

As per the title. I don't know where to find this information but, is wordpress Core still jquery dependant? I generally use my own custom themes, so I do not need jquery for the themes, and I can ...
Luca Reghellin's user avatar
0 votes
0 answers
25 views

remove_function method removing next priority action too while removing current priority

I found a strange behaviour from the WP core related to remove_action, add_action('my_custom_hook', 'mycustomfunc2',99); add_action('my_custom_hook', 'mycustomfunc3',100); function mycustomfunc1(){ ...
amrtansh's user avatar
0 votes
0 answers
19 views

What are scheduled callbacks?

I was taking a look at the inner workings of the Cron System, and found something odd: apparently, you can set a callback to event recurrence schedules. However, I can't find any documentation on that ...
Buzu's user avatar
  • 101
0 votes
1 answer
113 views

How to disable publish_future_post auto add wp_options cron

My website >> database >> wp_options >> option_name >> "cron" field total size 31GB (I was so surprised @@) After checking i see a lot of publish_future_post fields ...
Công Tử Huyết's user avatar
0 votes
1 answer
506 views

getEntityRecords/useEntityRecords: How to use CPT metadata?

I use getEntityRecords as described in the official data API tutorial (https://learn.wordpress.org/lesson/retrieving-wordpress-data-records/). I.e.: const [searchTerm, setSearchTerm] = useState( ''...
gresch's user avatar
  • 111
0 votes
1 answer
1k 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
249 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
  • 546
0 votes
1 answer
36 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
  • 332
0 votes
1 answer
48 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
407 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
1 answer
636 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
585 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
3 votes
1 answer
59 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
  • 381
0 votes
0 answers
957 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
  • 105
0 votes
1 answer
428 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
77 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
56 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
1 answer
600 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
29 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
122 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
45 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
60 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
4 votes
6 answers
4k 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
  • 918
1 vote
1 answer
21 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
334 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
35 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
  • 105
1 vote
0 answers
66 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
640 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
75 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
390 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
43 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
501 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,877
0 votes
2 answers
2k 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
  • 127
0 votes
1 answer
612 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
  • 918
0 votes
1 answer
124 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
1k 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
2 3 4 5