The core tag has no wiki summary.
11
votes
4answers
139 views
Why do some core functions get wp_ while others do not? What's the rule?
Is there some guideline or rationale behind why some WP code functions are prefixed with wp_ ? eg: wp_insert_post() vs. update_post_meta()
10
votes
3answers
1k views
Modifying WordPress core files
Why?
Sometimes an easy fix to altering the behavior of WordPress itself or a plugin could be to alter the files of the plugin or WordPress directly. When coming up with such an idea, the usual ...
9
votes
3answers
714 views
Easiest Way to Create a Patch for Submission to WordPress Core?
I've submitted a few patches for WordPress core on Trac (one of which has been used) but every time I think about doing it I cringe because my setup for doing so is incredibly tedious.
Can someone ...
8
votes
4answers
1k views
What is the role and history of the $content_width global variable?
I just stumbled over a global variable called $content_width. It was new to me, so far I could see that it's used in themes, both the standard twenty ten one and third party ones.
It looks like that ...
7
votes
4answers
626 views
What are some reasons why you should not hack WordPress core files?
Often a quick solution to a problem, can be solved by hacking the WordPress core, that is changing the code that is WordPress itself.
This is a very dangerous road to take! Don't do it, ever!
You ...
6
votes
2answers
406 views
Why does get_term() require taxonomy? Are term_ids not unique?
A related WPSE question asks how to get the term by specifying ID only, without specifying taxonomy. My question is more philosophical. Generally, stuff in WP core is there for a reason. I'm trying to ...
5
votes
2answers
308 views
Looking for WordPress System Diagrams
I am looking for WordPress chart/diagram system design.
I found only the template hierarchy diagram, but it's only part of the system.
source: ...
5
votes
2answers
322 views
What's $object->filter for?
I keep seeing this pattern, and wonder what it's for, how WP uses it internally:
if ( empty($post) ) {
if ( isset($GLOBALS['post']) )
$_post = & $GLOBALS['post'];
else
...
5
votes
2answers
270 views
Update to older wordpress version from admin?
I have a Wordpress 2.7.x setup that I would like to migrate to the latest version 3.2.1, however I need to make a stepped-upgrade as some plugins need an older version first (3.0.6 IIRC).
However ...
5
votes
1answer
332 views
is it possible to replace the use of gd_lib with imagick or ImageMagick?
i'm looking around for a solution since weeks and can't make anything work yet. the problem is that my server is running debian/lenny and it's not supporting the bundled gd_lib which i need for ...
5
votes
2answers
110 views
How do I use the WP image functions in a page template?
Wordpress has tons of mature code for image editing on the admin side, but I would like to provide a form inside of a custom page template for my visitors to drag and drop, crop and save a thumbnail ...
4
votes
2answers
1k views
$GLOBALS array for wordpress
is there a file where wordpress defines it's $GLOBALS?
i'm just curious as to what wordpress uses it for and for what purpose.
That's all!
4
votes
5answers
1k views
Change the login button on the login page
I would like to be able to change the text on the Log In button in wp-login.php - however, it's a bit more complicated than that. I want to be able to change it in the theme, rather than editing the ...
4
votes
1answer
41 views
What is the purpose of this line of code in wp_trim_excerpt? [closed]
Can someone please explain what the purpose of this code is:
$text = str_replace(']]>', ']]>', $text);
I'm referring to a line of code inside wp_trim_excerpt(), but I've seen something very ...
3
votes
2answers
139 views
How would I compare and remove hacks to core?
I have been put in charge of a site that have a lot (and i mean it) of core hacks,
some are pretty easy, some are really hard to spot (like removing a do_action on the_content.
So, my question is , ...
3
votes
2answers
136 views
Are the wordpress Core css styles really all nessasary?
On WordPress Codex there are this CSS styles listed, its a quite big list of styles but it seems they are doubled unnecessary.
It says:
Each Theme should have these or similar styles in its ...
2
votes
1answer
322 views
How Does Wordpress Uninclude/Deactivate A Plugin?
Wordpress uses the Observer Pattern for its plugin system and operates on the premise of checking if a plugin is activated, scanning the plugins directory and storing everything in an array in the ...
2
votes
1answer
199 views
Changing subdir multisite install to subdir core directory structure
Now that WordPress 3.5 is supposed to work with core files in subdirectory, I decided to move my local development setup (subdirectory multisite) to that configuration.
Fast forward and what I have ...
2
votes
1answer
30 views
How can i know when i can execute what functions of wordpress?
I like to do a bunch of stuff only on homepage and archive pages
i am working with the genesis framework (not really matters i guess)
if( is_singular() ) {
wp_die('functions.php');
}
...
2
votes
1answer
79 views
What is <# code #> in media-template.php, and how does it work?
I'm checking /wp-includes/media-template.php and just found this:
<# if ( data.compat && data.compat.meta ) { #>
{{{ data.compat.meta }}}
<# } #>
Never seen <# #> or ...
2
votes
1answer
251 views
How to disable `SQL_CALC_FOUND_ROWS` [duplicate]
Possible Duplicate:
wordpress query causing load
In the site I'm trying to optimize, I noticed several queries that are rather slow and start with SELECT SQL_CALC_FOUND_ROWS
Searching this ...
2
votes
2answers
673 views
Updating Wordpress - the best approach (updating wp core, plugins and db)
What is the best approach (steps) to update Wordpress when I have to update all of the following:
wp core
plugins
database
I came across this post http://codex.wordpress.org/Updating_WordPress ...
2
votes
3answers
1k views
Loading template files from a subfolder in my theme?
I am working on a site that will have up to 30 templates in it.
I don't want to have all those templates at the root of my theme folder cluttering up everything.
I know how I can modify the ...
2
votes
2answers
588 views
Replacing the default content created while the site creation
How do you replace the default title for first comment?
Mr WordPress on Hello world!
I could not able to locate this in theme's comments.php file
I want to edit the title 'Mr wordpress on Hello ...
1
vote
2answers
56 views
Find out if there is a available core update?
I want to set up a function that notifies me when a core update is available. But i can't find any functions that check for updates.
I have looked at list_core_updates() and it may be possible to ...
1
vote
2answers
107 views
How do I implement a .diff changeset from core.trac.wordpress.org locally?
I have a local copy of the latest version of wordpress that I set up using
svn co http://core.svn.wordpress.org/trunk/
There is a diff that I want to pull into my local fileset:
...
1
vote
2answers
357 views
Changing the comments link produced by the get_comments_link() and get_comments_pagenum_link() functions
Currently my theme calls upon get_comments_link() to create the standard anchor #comments to link to the comments below the post, as does the get_comments_pagenum_link() function on paginated ...
1
vote
1answer
291 views
Add More Fields to Users Pages (Admin Panel)
So I'm trying to create some custom fields for users. I need to give users access to a 30 day trial of some software and I want to keep track of that in the users page of administration panel. If the ...
1
vote
1answer
256 views
In what part of the Wordpress core does the users table and usermeta table get joined?
I have been trying to work out just where in the massive jungle of Wordpress include classes the usermeta table is joined onto the users table and if so, how does it work?
The one confusing thing ...
1
vote
1answer
56 views
Conditional hook based on the core function that is calling it
In a Multisite, I'm applying the filter get_blogs_of_user to sort the "My Sites" admin bar menu, where the sites are listed by blogname:
What happens is that I'd like another order elsewhere, where ...
1
vote
2answers
431 views
error: An Unexpected HTTP Error occurred during the API request
I'm using wordpress version 3.1 and if I try to upgrade any plugin on any of my sites I get the error message error: An Unexpected HTTP Error occurred during the API request. Not by upgrading ...
1
vote
1answer
367 views
How to override wp_insert_comment()
I am trying to override wp_insert_comment() (wp-includes/comment.php). I added the following lines of code in my functions.php file, located in my theme :
add_filter('wp_insert_comment', ...
1
vote
0answers
67 views
Can I hook into wp_update_core outside of the admin?
I'm trying to bring some of the admin functionality to a custom front end in WordPress. Questions of security and pragmatism of this aside, is there an available hook to trigger wp_update_core outside ...
1
vote
0answers
70 views
How to return an array of posts with the comments template intact for each post [closed]
Has anyone run across a way to build a page of posts that includes the comments and discussion form(s) for each post inline with the list?
I tried this a few ways today and found it quite difficult.
...
0
votes
1answer
65 views
why there is a large file named core in wpmu's directory?
why the file named core is here? can i delete it?
ls -lh
total 37M
-rw-rw-r-- 1 hugemeow pg 16 2012-03-04 04:22 a.php
-rw------- 1 hugemeow pg 30M 2012-10-16 10:41 core // this is the large ...
0
votes
2answers
167 views
Function to change a label (Username) in a core WordPress File (wp-includes/general-template.php)
Would like to change
'label_username' => __( 'Username' ) on line 258 of wp-includes/general-template.php
to
'label_username' => __( 'Username or Email' )
Changing core files is a not recommended ...
0
votes
3answers
463 views
What problems maybe happen if I remove “wp-” prefix from wordpress folders and files?
I want to hide wordpress signs from my site. So I don't want other people know that I built the website via WordPress. So I decided to remove wp- prefixes from all wordpress folders and files. And I ...
0
votes
1answer
42 views
Is there a wp-config.php option or constant that I can set to allow me to download nightly / beta builds?
Nightly Builds or Beta Releases?
I like using the /wp-admin/update-core.php utility to update wordpress. But I'd like to be able to use it to download beta releases or nightly builds.
Does anybody ...
0
votes
2answers
33 views
Possible to add a statement to a core file?
I would like to add one line to a wp core file. Basically on the 'edit.php' page, just right above
<?php
include('./admin-footer.php');
I would like to add an php include statement...
...
0
votes
1answer
172 views
How to Modify a Widgets UL and/or LI Classes
Im attempting to use twitter UL styles on a custom menu widget.
For example, in BootStrap they have a Nav List Style for UL's
<ul class="nav nav-list">
<li class="nav-header">List ...
0
votes
1answer
516 views
Most wp_nav_menu parameters ignored
I'm trying to get a text-based navigation menu for the footer of my site. I'm using the wp_nav_menu() parameters as directed by Codex. He're a snippet of code (in footer.php):
<div id="footer">
...
0
votes
1answer
28 views
Which file renders the “Edit Gallery” Settings page?
I was looking for a tutorial on adding options to the "Edit Gallery" page. In the hopes of adding some GUI inputs that would result in the generated [gallery] short-code having custom attributes.
I ...
0
votes
1answer
41 views
What's causing this error? “Warning: Invalid argument”
I noticed today that my error logs are littered with this information. I'm not quite sure what's causing it. Has anyone seen this before?
[Mon Mar 25 17:24:23 2013] [error] [client] PHP Warning: ...
0
votes
1answer
35 views
How to remove a settings section from the Theme Customization API preview pane?
I am currently working on a theme that uses the Wordpress Customization API and I need to remove some pre-existing sections from the customization preview pane. Is there somewhere like a global ...
0
votes
1answer
251 views
Headers already sent - Wordpress core
I'm getting an error on my site regarding "headers already sent":
Warning: Cannot modify header information - headers already sent by (output started at ........./wp-admin/menu-header.php:161) in ...
0
votes
2answers
1k views
How do I fix this error: Warning: invalid argument supplied for foreach()?
I recently moved a wordpress install from my local instance to a dev server. For the move, I installed a clean version of wordpress 3.4, moved exact duplicates of the file structre, and used the ...
0
votes
1answer
113 views
Allowed memory size of 33554432 bytes exhausted (tried to allocate 9967617 bytes) in …\wp-includes\functions.php
When a script times out, and there is nothing you can do about it ( cause it's running on a bloddy shared hosted resource where you have 0 control over the script time-outs ), can you run register ...
0
votes
1answer
39 views
What would make the plugin update process to complete but don't report as such?
This is happening in two sites I've restored using BackupBuddy*. One is single, the other Multisite.
.* this may render the question as "too localized", but maybe it could happen with any other ...
0
votes
1answer
341 views
Using native wp image support instead of timthumb
After having no luck with timthumb, and on the advice from this site I am going to edit my theme so it works using native wp functions. However I'm a little stuck.
I found this ...
0
votes
1answer
193 views
How to remove wordpress admin bar in dashboard
I would like to rebrand wordpress. Can anyone tell me how to remove it from dashboard?
Is there any hook available. Or I should edit core files. If i should edit core file can anyone tell me which ...