[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fL_xxgbc7Z6zxPGXwW6Yh5pQ3rF3b1OgjlALo8EWfD_M":3},{"slug":4,"display_name":5,"profile_url":6,"plugin_count":7,"total_installs":8,"avg_security_score":9,"avg_patch_time_days":10,"trust_score":11,"computed_at":12,"plugins":13},"eddiemoya","Eddie Moya","https:\u002F\u002Fprofiles.wordpress.org\u002Feddiemoya\u002F",4,460,85,30,84,"2026-04-04T13:44:16.785Z",[14,39,58,77],{"slug":15,"name":16,"version":17,"author":5,"author_profile":6,"description":18,"short_description":19,"active_installs":20,"downloaded":21,"rating":22,"num_ratings":23,"last_updated":24,"tested_up_to":25,"requires_at_least":26,"requires_php":27,"tags":28,"homepage":34,"download_link":35,"security_score":9,"vuln_count":36,"unpatched_count":36,"last_vuln_date":37,"fetched_at":38},"media-categories-2","Media Categories","1.5","\u003Cp>Allows users to assign categories (or other taxonomy terms) to items in their Media Library with a clean and simplified, searchable version of the standard category meta box.\u003Cbr \u002F>\nThe “Search Categories” field allows you to narrow your search for a category as you type – this functionality is not native to WordPress but is instead borrowed from Jason Corradino’s\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fwordpress.org\u002Fextend\u002Fplugins\u002Fsearchable-categories\u002F\" rel=\"ugc\">Searchable Categories\u003C\u002Fa> plugin. If you would like to enable this feature for your posts\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fwordpress.org\u002Fextend\u002Fplugins\u002Fsearchable-categories\u002F\" rel=\"ugc\">download his plugin here\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>Since WordPress 3.5 now supports attachment taxonomy, the work of adding a metabox to the attachment editor is happening entirely inside of WordPress. This is great, and we now have true metaboxes for taxonomy – they core team has also accepted my patches which caused several headaches for this plugin. Media Categories 1.5 takes advantage of the new Media Modal – with this plugin, you can now edit a images categories directly from the modal screen. I’ve also fixed some long standing bugs with the shortcode gallery functionality.\u003C\u002Fp>\n\u003Ch4>Updates\u003C\u002Fh4>\n\u003Cul>\n\u003Cli>Since version 1.5 : Supports the new WordPress 3.5 by adding the metabox to the new Media Modal. Also fixed bugs in the gallery shorcode behavior. All while still supporting 3.3.x – 3.4.x\u003C\u002Fli>\n\u003Cli>Since version 1.4 : This plugin allows for \u003Cstrong>multiple metaboxes\u003C\u002Fstrong> to be created for any number of taxonomies.\u003C\u002Fli>\n\u003Cli>Since version 1.3 : A \u003Cstrong>filter\u003C\u002Fstrong> has been added to allow developers to modify which taxonomy is being used. See ‘Other Notes’ > ‘Taxonomy Filter Usage’ for details\u003C\u002Fli>\n\u003Cli>Since version 1.2 : This plugin extends the native \u003Cstrong>[gallery] shortcode\u003C\u002Fstrong> of WordPress so that it has a ‘category’ parameter. See the “Shortcode Usage” under “Other Notes” for more details.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Shortcode Usage\u003C\u002Fh3>\n\u003Ch4>Normal Shortcode Usage\u003C\u002Fh4>\n\u003Cp>This plugin takes advantage of the existing \u003Ccode>[gallery]\u003C\u002Fcode> shortcode for showing images by adding the \u003Ccode>'category'\u003C\u002Fcode> parameter.\u003Cbr \u002F>\nThe value passed to the \u003Ccode>'category'\u003C\u002Fcode> parameter can be either the \u003Ccode>category\u003C\u002Fcode> \u003Ccode>slug\u003C\u002Fcode>, or the \u003Ccode>term_id\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cpre>\u003Ccode>[gallery category=\"my-category-slug\"]\nOR\n[gallery category=\"12\"]\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Its important to note that when passing the \u003Ccode>'category'\u003C\u002Fcode> parameter, the \u003Ccode>[gallery]\u003C\u002Fcode> shortcode will by default \u003Cstrong>ignore the current post\u003Cbr \u002F>\nand simply try to include all images from the category\u003C\u002Fstrong>. The syntax above will retrieve any images that are assigned\u003Cbr \u002F>\nto \u003Ccode>'my-category-slug'\u003C\u002Fcode> a.k.a term id \u003Ccode>#12\u003C\u002Fcode>, regardless of whether or not those images are attached to the current post.\u003C\u002Fp>\n\u003Cp>To query within a post (even the current post), you’ll need to explicitly add the post id as such…\u003C\u002Fp>\n\u003Cpre>\u003Ccode>[gallery category=\"my-category-slug\" id=\"43\"]\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>This shortcode will retrieve any images attached to post \u003Ccode>#43\u003C\u002Fcode> that are categorized as \u003Ccode>'my-slug-category'\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>Aside from this behavior, the [gallery] shortcode should behave exactly as it does by default with the built-in shortcode.\u003Cbr \u002F>\nThe \u003Ccode>id\u003C\u002Fcode> parameter will behave as normal when the \u003Ccode>category\u003C\u002Fcode> parameter is not invoked.\u003Cbr \u002F>\nFor more information on using the built-in \u003Ca href=\"https:\u002F\u002Fcodex.wordpress.org\u002FGallery_Shortcode\" rel=\"nofollow ugc\">gallery shortcode checkout the codex page\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch4>Other Taxonomy Shortcode Usage\u003C\u002Fh4>\n\u003Cp>If a developer implementing this plugin has made use of the \u003Ccode>mc_taxonomy\u003C\u002Fcode> filter to modify which taxonomy\u003Cbr \u002F>\nthis plugin uses for attachments, then the name of that particular taxonomy will need to be used in place of \u003Ccode>category\u003C\u002Fcode>\u003Cbr \u002F>\nas the shortcode parameter. For example, if you applied ‘Post Tags’ to your images then users should use the \u003Ccode>post_tag\u003C\u002Fcode> parameter\u003Cbr \u002F>\nin the Gallery Shortcode.\u003C\u002Fp>\n\u003Cpre>\u003Ccode>[gallery post_tag=\"my-tag-slug\"]\nOR\n[gallery post_tag=\"12\"]\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Cem>[Warning: nerdy developer stuff ahead]\u003C\u002Fem>\u003C\u002Fp>\n\u003Ch3>Multiple Taxonomy Metaboxes  *NEW!*\u003C\u002Fh3>\n\u003Cp>Since 1.4 this plugin allows developers to create metaboxes for any number of taxonomies. While previous the previous version allowed\u003Cbr \u002F>\ndevelopers to change the taxonomy being used, it still only allowed a single taxonomy metabox to be generated. With 1.4, that has changed.\u003C\u002Fp>\n\u003Cp>All a developer needs to do, is create a new instance of the Media_Categories class and pass their desired taxonomy as an argument.\u003C\u002Fp>\n\u003Cpre>\u003Ccode>$my_custom_media_metabox = new Media_Categories('my_custom_taxonomy');\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Thats it!, nothing else to it, the plugin will take care of the rest. You can create as many instances as you like – just make sure to be careful\u003Cbr \u002F>\nwhen doing this in conjunction with the \u003Ccode>mc_taxonomy\u003C\u002Fcode> filter – always check the current taxonomy.\u003C\u002Fp>\n\u003Cp>Obviously this works with any taxonomy, including built-in taxonomies such as ‘post_tag’, ‘link_categories’,\u003Cbr \u002F>\nand yes, even ‘nav_menu’. I’ll leave it to you developers out uses for that.\u003C\u002Fp>\n\u003Ch3>Taxonomy Filter Usage: ‘mc_taxonomy’\u003C\u002Fh3>\n\u003Cp>\u003Cstrong>Note\u003C\u002Fstrong>: Since 1.4, this plugin allows developers to generate any number of metaboxes, for any number of different taxonomies. Because of this,\u003Cbr \u002F>\nit is important that when filtering the taxonomy, developers conditionally check the current taxonomy before returning a different – otherwise\u003Cbr \u002F>\nthe filter would override \u003Cem>all\u003C\u002Fem> instances of the plugin’s metaboxes with the same taxonomy. The examples below have been changes accordingly\u003C\u002Fp>\n\u003Cp>Since version 1.3, the Media Categories plugin includes a filter allowing developers to modify the taxonomy being used.\u003Cbr \u002F>\nChanging the taxonomy will automatically change all the labels used around the metabox, and change the way the Gallery Shortcode\u003Cbr \u002F>\nworks so that it accommodates whatever taxonomy has been chosen.\u003C\u002Fp>\n\u003Cp>The tag for this filter is \u003Ccode>'mc_taxonomy'\u003C\u002Fcode>, and usage could not be simpler.\u003C\u002Fp>\n\u003Cpre>\u003Ccode>add_filter('mc_taxonomy', 'mc_filter_taxonomy');\n\nfunction mc_filter_taxonomy($taxonomy){\n\n    if($taxonomy == 'category'){\n        $taxonomy = 'post_tag';\n    }\n\n    return $taxonomy\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The above code will swap out all references to ‘category’ with appropriate (properly pluralized) references to the ‘post_tag’ taxonomy.\u003C\u002Fp>\n\u003Cp>It will also change the way the Gallery Shortcode works to use your chosen taxonomy.\u003C\u002Fp>\n\u003Ch4>Important (potential gotchas)\u003C\u002Fh4>\n\u003Cul>\n\u003Cli>The \u003Ccode>category\u003C\u002Fcode> parameter for the Gallery Shortcode will be changed by using this filter, so that instead of \u003Ccode>category\u003C\u002Fcode> is will by \u003Ccode>your_taxonomy\u003C\u002Fcode>. In the case above with tags,\u003Cbr \u002F>\nyou would write a shortcode as such. \u003Ccode>[gallery post_tag=\"my-tag\"]\u003C\u002Fcode> OR \u003Ccode>[gallery post_tag=\"43\"]\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>If using a Custom Taxonomy with this plugin, be sure to assign values to the labels for proper pluralization and context\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Related Plugin\u003C\u002Fh3>\n\u003Cp>Checkout this great plugin for Searchable Categories by Jason Corradino, whose javascript I use in this plugin.\u003Cbr \u002F>\nI believe this very simple functionality should be a part of the standard categories metabox in core.\u003Cbr \u002F>\nWhile I do not employ the plugin directly, the javascript used for filtering\u002Fsearching is in fact derived with\u003Cbr \u002F>\nconsent, and a few modifications from that plugin. To enable this feature on all your category metaboxes, install the\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fwordpress.org\u002Fextend\u002Fplugins\u002Fsearchable-categories\u002F\" rel=\"ugc\">Searchable Categories\u003C\u002Fa> plugin.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fwordpress.org\u002Fextend\u002Fplugins\u002Fsearchable-categories\u002F\" rel=\"ugc\">Searchable Categories\u003C\u002Fa> by Jason Corradino\u003C\u002Fli>\n\u003C\u002Ful>\n","Easily assign categories to media with a clean, simple, and searchable category meta box. Then use the gallery shortcode to display category galleries",300,30032,68,7,"2012-12-18T22:07:00.000Z","3.5.2","3.3","",[29,30,31,32,33],"attachment-categories","categories","category","media","media-categories","http:\u002F\u002Fwordpress.org\u002Fextend\u002Fplugins\u002Fmedia-categories-2","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Fmedia-categories-2.1.5.zip",0,null,"2026-03-15T15:16:48.613Z",{"slug":40,"name":41,"version":42,"author":5,"author_profile":6,"description":43,"short_description":44,"active_installs":45,"downloaded":46,"rating":45,"num_ratings":47,"last_updated":48,"tested_up_to":49,"requires_at_least":50,"requires_php":27,"tags":51,"homepage":56,"download_link":57,"security_score":9,"vuln_count":36,"unpatched_count":36,"last_vuln_date":37,"fetched_at":38},"category-template-hierarchy","Category Template Hierarchy","1.3.2.1","\u003Cp>Adds several new templates to the template hierarchy:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>child-of-category-{slug}.php\u003C\u002Fli>\n\u003Cli>category-{slug}.php\u003C\u002Fli>\n\u003Cli>child-of-category-{id}.php\u003C\u002Fli>\n\u003Cli>category-{term_id}.php\u003C\u002Fli>\n\u003Cli>parent-category.php\u003C\u002Fli>\n\u003Cli>child-category.php\u003C\u002Fli>\n\u003Cli>category.php\u003C\u002Fli>\n\u003Cli>archive.php\u003C\u002Fli>\n\u003Cli>index.php\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>This greatly extends the native hierarchy of theme templates with regard to\u003Cbr \u002F>\ncategories. Theme developers can now easily create separate templates for\u003Cbr \u002F>\ncategories with children, with parents, and children of specific parents.\u003C\u002Fp>\n\u003Cp>Additionally makes available four (4) new conditional template tags:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>is_child_category();\u003C\u002Fli>\n\u003Cli>is_parent_category();\u003C\u002Fli>\n\u003Cli>is_child_of_category();\u003C\u002Fli>\n\u003Cli>is_parent_of_category();\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>These functions are available for use in any theme or plugin as along as this\u003Cbr \u002F>\nplugin is active. For detailed documentation of these functions see the\u003Cbr \u002F>\n‘Developer Notes: Conditional Tags’ section of this readme file.\u003C\u002Fp>\n\u003Cp>Note: This plugin does not actually create parent-category.php, child-category.php\u003Cbr \u002F>\nor any of their related templates – rather it modifies the native \u003Ca href=\"https:\u002F\u002Fcodex.wordpress.org\u002FTemplate_Hierarchy\" rel=\"nofollow ugc\">template hierarchy\u003C\u002Fa>\u003Cbr \u002F>\nto allow theme developers to create specific templates for parent and child categories.\u003C\u002Fp>\n\u003Ch3>Developer Notes: Template Hierarchy\u003C\u002Fh3>\n\u003Cp>What follows are is the modified list of templates available for category pages.\u003Cbr \u002F>\nThese expand upon the native \u003Ca href=\"https:\u002F\u002Fcodex.wordpress.org\u002FTemplate_Hierarchy#Visual_Overview\" rel=\"nofollow ugc\">Template Hierarchy\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>child-of-category-{slug}.php\u003C\u002Fli>\n\u003Cli>category-{slug}.php\u003C\u002Fli>\n\u003Cli>child-of-category-{id}.php\u003C\u002Fli>\n\u003Cli>category-{term_id}.php\u003C\u002Fli>\n\u003Cli>parent-category.php\u003C\u002Fli>\n\u003Cli>child-category.php\u003C\u002Fli>\n\u003Cli>category.php\u003C\u002Fli>\n\u003Cli>archive.php\u003C\u002Fli>\n\u003Cli>index.php\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The parent and child templates only become available if the current category is\u003Cbr \u002F>\na parent or a child respectively.\u003C\u002Fp>\n\u003Cp>Note: This plugin does not actually create parent-category.php, child-category.php\u003Cbr \u002F>\nor any of their related templates – rather it modifies the native \u003Ca href=\"https:\u002F\u002Fcodex.wordpress.org\u002FTemplate_Hierarchy\" rel=\"nofollow ugc\">template hierarchy\u003C\u002Fa>\u003Cbr \u002F>\nto allow theme developers to create specific templates for parent and child categories.\u003C\u002Fp>\n\u003Ch3>Developer Notes: Conditional Tags\u003C\u002Fh3>\n\u003Cp>With this plugin comes two additional \u003Ca href=\"https:\u002F\u002Fcodex.wordpress.org\u002FConditional_Tags\" rel=\"nofollow ugc\">conditional tags\u003C\u002Fa>\u003Cbr \u002F>\nwhich behave much like any other in WordPress. In a similar fashion to how one\u003Cbr \u002F>\nmight use \u003Ca href=\"https:\u002F\u002Fcodex.wordpress.org\u002FFunction_Reference\u002Fis_category\" rel=\"nofollow ugc\">is_category()\u003C\u002Fa> or \u003Ca href=\"https:\u002F\u002Fcodex.wordpress.org\u002FFunction_Reference\u002Fcat_is_ancestor_of\" rel=\"nofollow ugc\">cat_is_ancestory_of()\u003C\u002Fa>,\u003Cbr \u002F>\ndevelopers may, with this plugin, use the following functions:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>is_parent_category()\u003C\u002Fli>\n\u003Cli>is_child_category()\u003C\u002Fli>\n\u003Cli>is_child_of_category()\u003C\u002Fli>\n\u003Cli>is_parent_of_category()\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch4>Description (part 1)\u003C\u002Fh4>\n\u003Cp>The \u003Ccode>is_parent_category()\u003C\u002Fcode> and \u003Ccode>is_child_category()\u003C\u002Fcode> conditional tags check if\u003Cbr \u002F>\nthe page being displayed (or passed as an argument) is of a category that has\u003Cbr \u002F>\nchildren (e.g. is a parent category)  has a parent (is a child), respectively.\u003Cbr \u002F>\nThey are boolean functions, meaning they return either TRUE or FALSE.\u003C\u002Fp>\n\u003Ch4>Usage\u003C\u002Fh4>\n\u003Cpre>\u003Ccode>\u003C?php is_parent_category( $category ); ?>\n\u003C?php is_child_category( $category ); ?>\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch4>Parameters\u003C\u002Fh4>\n\u003Cp>$category (integer\u002Fstring\u002Fobject) (optional) Category ID, Category Slug, Category Object. Default: Current Category\u003C\u002Fp>\n\u003Cp>Note: Unlike is_category(), these functions will not take arrays of categories or category titles. I’ll work on that. Sorry.\u003C\u002Fp>\n\u003Ch4>Return Values\u003C\u002Fh4>\n\u003Cp>(boolean) True on success, false on failure.\u003C\u002Fp>\n\u003Ch4>Examples\u003C\u002Fh4>\n\u003Cpre>\u003Ccode>is_parent_category()\nis_child_category()\n\u002F\u002F When any parent\u002Fchild category archive page is being displayed\n\nis_parent_category( '9' );\nis_child_category( '9' );\n\u002F\u002F When the archive page for Category 9 is being displayed AND its a parent\u002Fchild.\n\nis_parent_category( 'blue-cheese' );\nis_child_category( 'blue-cheese' );\n\u002F\u002F When the archive page for the Category with Category Slug \"blue-cheese\" is being displayed AND its a parent\u002Fchild.\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch4>Description (part 2)\u003C\u002Fh4>\n\u003Cp>The \u003Ccode>is_parent_of_category()\u003C\u002Fcode> and \u003Ccode>is_child_of_category()\u003C\u002Fcode> conditional tags\u003Cbr \u002F>\ncheck if a given category has a parent or child relationship to the current\u003Cbr \u002F>\ncategory or a category passed as its second parameter. They are\u003Cbr \u002F>\nboolean functions, meaning they return either TRUE or FALSE.\u003C\u002Fp>\n\u003Ch4>Usage\u003C\u002Fh4>\n\u003Cpre>\u003Ccode>\u003C?php is_parent_of_category($child_category, $parent_category, $direct_descendant); ?>\n\u003C?php is_child_of_category($parent_category, $child_category, $direct_descendant);?>\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch4>Parameters\u003C\u002Fh4>\n\u003Cp>(object\u002Fstring\u002Finteger) (required) Category of the would-be parent\u002Fchild respectively.\u003Cbr \u002F>\n(object\u002Fstring\u002Finteger) (optional) Category of the would-be child\u002Fparent respectfully. Default: Current Category\u003Cbr \u002F>\n(boolean) (optional) Whether or not the child should be a direct child of the parent. Default: True\u003Cbr \u002F>\n *\u003C\u002Fp>\n\u003Ch4>Return Values\u003C\u002Fh4>\n\u003Cp>(boolean) If the $direct_descendant flag set to true, function returns true if the child is a direct descendant of the parent, if child is no direct it will return false. If $direct_descendant is set to false it will return the same results as cat_is_ancestor_of().\u003C\u002Fp>\n\u003Ch4>Examples\u003C\u002Fh4>\n\u003Cp>The following function will return True…\u003C\u002Fp>\n\u003Cpre>\u003Ccode>is_child_of_category(0);\n\u002F\u002F When a top level category is being displayed, zero being the parent id value for top level categories (e.g. categories with no parents).\n\nis_child_of_category(12);\n\u002F\u002F When the current category is a direct child of the category whose ID is '12'.\n\nis_child_of_category('tv-shows')\n\u002F\u002F When the current category is a direct child of the category with the slug 'tv-shows' (can also be category ID's).\n\nis_child_of_category('tv-shows', 'dexter');\n\u002F\u002F When the category with slug 'dexter' is a direct child of the category with the slug 'tv-shows' (can also be category ID's). This may come in handy when manipulating categories while not in a category template.\n\nis_child_of_category('tv-shows', 'dexter', false);\n\u002F\u002F When the category with the slug 'dexter' is a descendant of the category 'tv-shows' at any level. (uses cat_is_ancestor_of())\n\nis_child_of_category('tv-shows', null, false);\n\u002F\u002F When the current category is a descendant of the 'tv-shows' category at any level. (uses cat_is_ancestor_of())\n\nis_parent_of_category(13);\n\u002F\u002F When the current category is the direct parent of a category with the ID '13'.\n\nis_parent_of_category('dexter');\n\u002F\u002F When the current category is the direct parent of the category with the slug 'dexter'.\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Backward Compatibility\u003C\u002Fh3>\n\u003Cp>The changes this plugin makes to the template hierarchy are significantly different\u003Cbr \u002F>\nfrom that in 1.0.5 and before. If you prefer to use that version please find it\u003Cbr \u002F>\nin the Older Versions in the WordPress plugins directory, it is tagged as 1.0.5.\u003C\u002Fp>\n\u003Cp>While I do not actively support to QA the older version, I would gladly take a\u003Cbr \u002F>\nlook at any future bugs that crop up and are reported.\u003C\u002Fp>\n","Adds parent-category.php, child-category.php, and child-category-{slug|id} templates to the hierarchy and conditional tags to match.",100,18999,3,"2012-03-24T03:12:00.000Z","3.3.2","3.0",[31,52,53,54,55],"hierarchy","template","theme","theme-development","http:\u002F\u002Feddiemoya.com\u002F","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Fcategory-template-hierarchy.zip",{"slug":59,"name":60,"version":61,"author":5,"author_profile":6,"description":62,"short_description":63,"active_installs":64,"downloaded":65,"rating":45,"num_ratings":66,"last_updated":67,"tested_up_to":68,"requires_at_least":27,"requires_php":27,"tags":69,"homepage":75,"download_link":76,"security_score":9,"vuln_count":36,"unpatched_count":36,"last_vuln_date":37,"fetched_at":38},"incorrect-datetime-bug-plugin-fix","Incorrect Datetime Bug Fix","1.1","\u003Cp>This plugin was create to work around a problem caused by certain configurations in MySQL that lead to several odd symptoms including but not limited to:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Loss of ability to create new posts\u003C\u002Fli>\n\u003Cli>Loss of ability to update posts\u003C\u002Fli>\n\u003Cli>Errors regarding invalid timestamps\u003C\u002Fli>\n\u003Cli>Admin interface reverts to lowest permissions ex:‘Publish’ button says ‘Submit Draft’.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>In addition, this problem is often accompanied by an error like the following:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>WordPress database error: [Incorrect datetime value: '0000-00-00 00:00:00' for column 'post_date_gmt' at row 1]\nINSERT INTO 'mg_posts' ('post_author','post_date','post_date_gmt','post_content','post_content_filtered','post_title',\n'post_excerpt','post_status','post_type','comment_status','ping_status','post_password','post_name','to_ping','pinged',\n'post_modified','post_modified_gmt','post_parent','menu_order','guid') VALUES (’1′,’2011-08-23 03:32:43′,\n’0000-00-00 00:00:00′,”,”,’Auto Draft’,”,’auto-draft’,'post’,'closed’,'open’,”,”,”,”,’2011-08-23 03:32:43′,’0000-00-00 00:00:00′,’0′,’0′,”)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The inability to pass zero dates breaks the ability to actually create a new post, but it also seems to have the odd secondary effect of confusing the heck out of nonces (noces are a security feature), probably because they too rely on timestamps.\u003C\u002Fp>\n\u003Cp>This plugin strips out the sql_modes listed below from @@SESSION, thereby eliminating the problem while only effecting database sessions WordPress starts and not the whole database.\u003C\u002Fp>\n\u003Ch3>Explanation and history of the problem\u003C\u002Fh3>\n\u003Cp>The cause of this problem stems from an old (soon to be deprecated) odd behavior\u002Ffeature of MySQL which WordPress came to depend on. My understanding is that it stems from problems in MySQL with regard to using the MySQL NOW() function in some contexts – so as a workaround it was decided that if a date of all zeros was entered on a column that was set as NOT NULL, then that date would not be rejected, but instead would be converted to the current date – to mimic NOW().\u003C\u002Fp>\n\u003Cp>Subsequently this method was marginalized as generally a bad idea – and now values exist for a setting called sql_mode, which turn this behavior off and force errors when a null value is passed to a NOT NULL field. In many cases when there is an actual DBA in charge of the database, they will assign these values to the production database to force what outside of MySQL would be normal SQL behavior.\u003C\u002Fp>\n\u003Cp>There are 3 sql_modes which will trigger the error by disabling the ability to enter zero dates.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>NO_ZERO_DATE\u003C\u002Fli>\n\u003Cli>NO_ZERO_IN_DATE\u003C\u002Fli>\n\u003Cli>TRADITIONAL\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>It’s worth mentioning that the ALLOW_INVALID_DATES mode does NOT solve the problem, even though by the name of it, it would seem that it might.\u003C\u002Fp>\n\u003Ch3>The solution\u003C\u002Fh3>\n\u003Cp>This plugin solves the problem with minimal effect to the database environment. All this plugin does it check to see if the sql_modes in question are set, and if they are, it removes them.\u003C\u002Fp>\n\u003Cp>Importantly, this plugin changes @@SESSION.sql_mode and not @@GLOBAL.sql_mode. By changing sql_mode via the session, it only takes effect on each specific connections WordPress makes with the database rather than changing it for the entire database permanently – as such this will have no effect whatsoever on any applications that might happen to be using the same database.\u003C\u002Fp>\n\u003Ch3>Other manifestations, alternative solutions.\u003C\u002Fh3>\n\u003Cp>WARNING: Whenever applicable, consult your DBA before making any changes to production databases.\u003C\u002Fp>\n\u003Cp>This problem may (I have no idea) in fact be more common during installation. The errors are different, and although I have seen them, I do not have them handy at this time. In any case, if the sql_modes are set during installation – the process will fail from the start – because of this, it is my presumption that anyone encountering the errors as described above – has probably recently migrated to a new database, or perhaps recently acquired an enthusiastic new DBA who has made some changes.\u003C\u002Fp>\n\u003Cp>This plugin DOES NOT FIX this problem for those encountering during installation – thats impossible because WordPress ignores all plugins during installation – so there is no way to hack around it via plugin and fix it before installation occurs.\u003C\u002Fp>\n\u003Cp>If you are encountering this problem during installation you will need to find an alternative way to remove the modes. If this is a production environment this may require the cooperation of a DBA who may not like the idea. If met with resistance, I suggest the asking for the modes to be temporarily removed for installation, and then set back after its dont – at which point this plugin will handle the problem from then on.\u003C\u002Fp>\n\u003Cp>If your encountering this locally, or on a environment whose database you have access to modify, you will want to make as few changes as possible, so go to whatever interface you use (command line, phpMyAdmin, whatever) and run this line of SQL:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>SELECT @@GLOBAL.sql_mode;\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>This will show you all the sql modes currently defined. Copy all them them but if you have NO_ZERO_DATE, NO_ZERO_IN_DATE, or TRADITIONAL remove them. Then update sql_mode with the remaining modes as such:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>SET @@GLOBAL.sql_mode = \"STRICT_TRANS_TABLES,STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO\";\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Please don’t simply use the sql_mode definition I have shown above, this is only an example – be sure to use the modes from your database configuration. Remember to keep everything together NO SPACES ALLOWED in the definition.\u003C\u002Fp>\n\u003Cp>Finally, if your just working locally and don’t care about these sql_modes, you can just clear them all.\u003C\u002Fp>\n\u003Cpre>\u003Ccode>SET @@GLOBAL.sql_mode = \"\";\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>This will do the trick but is absolutely not recommended as a fix for production sites that might share environments.\u003C\u002Fp>\n\u003Cp>Irrelevant Note: I struggled with naming this plugin, and settled on the terminology seen in the error message.\u003C\u002Fp>\n","This plugin was create to work around a problem caused by certain configurations in MySQL that lead to several odd symptoms including but not limited  &hellip;",50,3449,2,"2013-01-07T19:49:00.000Z","3.2.1",[70,71,72,73,74],"mysql","no_zero_date","no_zero_in_date","sql","sql_mode","http:\u002F\u002Feddiemoya.com\u002Fplugins\u002Fincorrect-datetime-bug-fix-wordpress\u002F","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Fincorrect-datetime-bug-plugin-fix.1.1.zip",{"slug":78,"name":79,"version":80,"author":5,"author_profile":6,"description":81,"short_description":82,"active_installs":83,"downloaded":84,"rating":36,"num_ratings":36,"last_updated":85,"tested_up_to":49,"requires_at_least":86,"requires_php":27,"tags":87,"homepage":27,"download_link":93,"security_score":9,"vuln_count":36,"unpatched_count":36,"last_vuln_date":37,"fetched_at":38},"simple-hook-widget","Simple Hook Widget","2","\u003Cp>This widget allows the user to insert a hook, with a name of their choosing, in any sidebar.\u003C\u002Fp>\n\u003Cp>The hook can be anything, an existing hook from the WordPress Core, a plugin, a theme, or something you’ve come up with on the fly. Once the hook exists, your plugins, your theme, or the WordPress Core to make something happen with that hook.\u003C\u002Fp>\n\u003Cp>This can be used in conjunction with other more complex plugins, to allow you to trigger a hook from the sidebar (yes, that is intentionally vague). It can also serve as a quick alternative to making very simple widgets tied to code from a theme. Say you have a chunk of code which already exists on your site, you’d like to also have it placed in a sidebar, but don’t want to make a widget out of it (since its entirely theme-centric). You could simply hook this chunk of code to a custom hook and use the Simple Hook Widget to place that custom hook in the sidebar.\u003C\u002Fp>\n\u003Cp>This is clearly not the best method of widget development, but there may be times where such on option is useful to a developer in a pinch.\u003C\u002Fp>\n\u003Ch4>Update 2.0\u003C\u002Fh4>\n\u003Cul>\n\u003Cli>New filter which allows developers to specify what hooks are available to choose from.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Warning: Use this plugin with care. If you are not a developer and don’t know what ‘hooks’ are, this plugin is not for you. This plugin will allow you to enter \u003Cem>ANY\u003C\u002Fem> hook, and will run it in the sidebar – that includes core WordPress loaded with actions that could result in problems for your site.\u003C\u002Fp>\n\u003Ch3>Developer Notes\u003C\u002Fh3>\n\u003Ch4>IMPORTANT:\u003C\u002Fh4>\n\u003Cp>If the ‘simple-hook-list’ is not filtered, the Simple Hook Widget will not show a drop down in the widget interface, but instead it will provide an empty text field allowing a user to enter \u003Cem>ANY\u003C\u002Fem> hook they like.\u003C\u002Fp>\n\u003Ch4>Using the hooks\u003C\u002Fh4>\n\u003Cp>Here is a simple example of how to use a hook used in the Simple Hook Widget. Its just like using any other hook in WordPress. Remember, you can do whatever you want here, you just need to make sure the hook used in the add_action() is the same as the hook name selected in a particular widget.\u003C\u002Fp>\n\u003Cp>Example #1:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>function simple_hook_super_example() {\n    echo \"This is my super simple hook widget\";\n}\nadd_action('example-hook-name-one', 'simple_hook_super_example');\n\n\nYou can create any number of different widgets by simply writing a function, and adding it as an action to a hook. Here is a similar one as the first, but this is here to illustrate the point.\n\nExample #2:\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>function simple_hook_awesome_example() {\u003C\u002Fp>\n\u003Cpre>\u003Ccode>\u002F\u002FDo whatever you want your 'widget' to do, when the 'example-hook-name-two' hook is chosen.\necho \"This is my awesome simple hook widget\";\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>}\u003Cbr \u002F>\nadd_action(‘example-hook-name-two’, ‘simple_hook_awesome_example’);\u003C\u002Fp>\n\u003Ch4>Creating dropdown of Pre-determined hooks\u003C\u002Fh4>\n\u003Ch4>Filter: ‘simple-hook-list’\u003C\u002Fh4>\n\u003Cpre>\u003Ccode>Version 2.0 of the Simple Hook Widget includes the 'simple-hook-list' filter which allows developers to specify a set of hooks which can be selected from the widgets admin panel.\n\nThe function you create should return an associative array where the index is the actual hook's name, and the value is the text that will represent it in the drop down on the widgets panel. \n\nExample:\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>function simple_hook_example_filter($hooks){\u003Cbr \u002F>\n    $hooks = array (\u003Cbr \u002F>\n        ‘example-hook-name-one’ => ‘Awesome Widget’,\u003Cbr \u002F>\n        ‘example-hook-name-two’ => ‘Simple Widget’\u003Cbr \u002F>\n    );\u003Cbr \u002F>\n    return $hooks;\u003Cbr \u002F>\n}\u003Cbr \u002F>\nadd_filter(‘simple-hook-list’, ‘simple_hook_example_filter’);\u003C\u002Fp>\n\u003Ch4>IMPORTANT:\u003C\u002Fh4>\n\u003Cp>If the ‘simple-hook-list’ is not filtered, the Simple Hook Widget will not show a drop down in the widget interface, but instead it will provide an empty text field allowing a user to enter \u003Cem>ANY\u003C\u002Fem> hook they like.\u003C\u002Fp>\n\u003Ch4>Hook: simple-hook-default\u003C\u002Fh4>\n\u003Cpre>\u003Ccode>This hook allows developers provide a default value for the Simple Hook widget. By default, the default value for the hook, is an empty string.\nExample:\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>function simple_hook_example_default($default_hook){\u003Cbr \u002F>\n    return ‘example-hook-name-two’;\u003Cbr \u002F>\n}\u003Cbr \u002F>\n`\u003Cbr \u002F>\nNote: If filtering ‘simple-hook-list’ to create a drop down, the default value must match one of the \u003Cem>keys\u003C\u002Fem> in the array passed to the filter – otherwise this default will do nothing.\u003C\u002Fp>\n\u003Ch4>Hook: simplehookupdate_\u003C\u002Fh4>\n\u003Cp>This widget also contains an internal hook, which will be \u003Cem>your\u003C\u002Fem> hook, prefixed with simplehookupdate_. So if you use this plugin to create a hook name ‘testhook’, the widget, aside from creating the ‘testhook’ in the chosen sidebar location, will also create a hook called ‘simplehookupdate_testhook’. This hook occurs within the update method of the WP_Widget class, immediately before $instance is returned.\u003C\u002Fp>\n\u003Cp>Not sure how useful this is, but a friend suggested it, so here is it.\u003C\u002Fp>\n","Allows developers to create a drop down of hooks to be selected from a widget, for on-the-fly widgets without the fuss, or just easily test hooks.",10,3701,"2012-03-15T00:05:00.000Z","2.8",[88,89,90,91,92],"custom-hook","development","hook","sidebar","widget","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Fsimple-hook-widget.zip"]