GD Press Tools

custom functions

  gd_disable_feed ()
  Message to dispay to disabled RSS feeds.
  gd_set_revisions ($status)
  Change the status of post revisions saving.
  gd_reset_widgets ()
  Resets sidebars widgets.
  gd_optimize_db ()
  Optimizes WordPress database tables.
  gd_clear_rss_cache ()
  Clear RSS Feeds cache from the database.
  gd_get_wordpress_tables ()
  Gets the list of all WordPress tables.
  gd_get_database_tables ()
  Gets the list of all tables in active database.
  gd_get_database_table_columns ($table)
  Gets the array with columns of the database table.
  gd_db_table_drop ($table)
  Drop database table.
  gd_db_table_empty ($table)
  Empty database table.
  gd_count_revisions_total ()
  Get total number of revisions for all posts.
  gd_count_revisions ($post_id)
  Get post revisions count for the post.
  gd_delete_all_revisions ()
  Deletes all revisions for all published posts.
  gd_delete_revisions ($post_id)
  Deletes revisions for selected post.
  gd_create_protection_files ()
  Creates index.php for protecting wp-content folders.
gd_clear_rss_cache (  ) 

Clear RSS Feeds cache from the database.

WPDB $wpdb wordpress database object string $table_prefix prefix used for database tables

gd_count_revisions ( post_id  ) 

Get post revisions count for the post.

WPDB $wpdb wordpress database object string $table_prefix prefix used for database tables

Parameters:
int  $post_id post id to get revisions from
Returns:
int number of revisions

gd_count_revisions_total (  ) 

Get total number of revisions for all posts.

WPDB $wpdb wordpress database object string $table_prefix prefix used for database tables

Returns:
int number of revisions

gd_create_protection_files (  ) 

Creates index.php for protecting wp-content folders.

gd_db_table_drop ( table  ) 

Drop database table.

WPDB $wpdb wordpress database object string $table_prefix prefix used for database tables

Returns:
array table columns

gd_db_table_empty ( table  ) 

Empty database table.

WPDB $wpdb wordpress database object string $table_prefix prefix used for database tables

Returns:
array table columns

gd_delete_all_revisions (  ) 

Deletes all revisions for all published posts.

WPDB $wpdb wordpress database object string $table_prefix prefix used for database tables

Returns:
int number of deleted revisions

gd_delete_revisions ( post_id  ) 

Deletes revisions for selected post.

WPDB $wpdb wordpress database object string $table_prefix prefix used for database tables

Parameters:
int  $post_id post id to delete revisions from
Returns:
int number of deleted revisions

gd_disable_feed (  ) 

Message to dispay to disabled RSS feeds.

gd_get_database_table_columns ( table  ) 

Gets the array with columns of the database table.

WPDB $wpdb wordpress database object string $table_prefix prefix used for database tables

Returns:
array table columns

gd_get_database_tables (  ) 

Gets the list of all tables in active database.

WPDB $wpdb wordpress database object string $table_prefix prefix used for database tables

Returns:
array list of wordpress tables

gd_get_wordpress_tables (  ) 

Gets the list of all WordPress tables.

WPDB $wpdb wordpress database object string $table_prefix prefix used for database tables

Returns:
array list of wordpress tables

gd_optimize_db (  ) 

Optimizes WordPress database tables.

WPDB $wpdb wordpress database object

gd_reset_widgets (  ) 

Resets sidebars widgets.

gd_set_revisions ( status  ) 

Change the status of post revisions saving.

Parameters:
int  $status Status to set (-1, 0, >0)