This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ifModule mod_deflate.c> | |
| AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript application/json | |
| </ifModule> | |
| Header unset ETag | |
| FileETag None | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{REQUEST_FILENAME} -s [OR] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Print direct link to plugin admin page | |
| * | |
| * Fetches array of links generated by WP Plugin admin page ( Deactivate | Edit ) | |
| * and inserts a link to the plugin admin page (plugins.php) | |
| * | |
| * @param array $links Array of links generated by WP in Plugin Admin page. | |
| * @return array Array of links to be output on Plugin Admin page. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Register text domain | |
| * | |
| * @since 0.1 | |
| */ | |
| function tmx_textdomain() { | |
| load_plugin_textdomain( 'themeaxe', false, dirname(plugin_basename(__FILE__)). '/languages/' ); | |
| } | |
| add_action( 'init', 'tmx_textdomain' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Prevent Direct Access | |
| * | |
| * @since 0.1 | |
| */ | |
| defined('ABSPATH') or die("No script kiddies please!"); | |
| /** | |
| * Plugin constants |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type='text/javascript'> | |
| /* <![CDATA[ */ | |
| var scriptParams = {"theme":"light"}; | |
| /* ]]> */ | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Add a widget to the dashboard. | |
| * | |
| * This function is hooked into the 'wp_dashboard_setup' action below. | |
| * Reference: https://codex.wordpress.org/Dashboard_Widgets_API | |
| */ | |
| function example_add_dashboard_widgets() { | |
| wp_add_dashboard_widget( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Extend WP_Widget class, | |
| * | |
| * Reference: | |
| * https://codex.wordpress.org/Widgets_API | |
| * https://codex.wordpress.org/Function_Reference/the_widget | |
| */ | |
| // Creating the widget |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * The Transients API is very similar to the Options API but with the added feature of an expiration time, | |
| * which simplifies the process of using the wp_options database table to temporarily store cached information. | |
| * Reference: https://codex.wordpress.org/Transients_API | |
| */ | |
| // Get any existing copy of our transient data | |
| if ( false === ( $special_query_results = get_transient( 'special_query_results' ) ) ) { | |
| // It wasn't there, so regenerate the data and save the transient |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Adds the individual sections, settings, and controls to the theme customizer | |
| * Reference: https://codex.wordpress.org/Theme_Customization_API | |
| */ | |
| function tmx_theme_customizer( $wp_customize ) { | |
| $wp_customize->add_section( | |
| 'social_section', | |
| array( | |
| 'title' => 'Social Links', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Retrieves a modification setting for the current theme | |
| * Get, set or remove values of theme customizer | |
| * | |
| * Functions | |
| * get_theme_mod() | |
| * get_theme_mods() | |
| * set_theme_mod() | |
| * remove_theme_mod() |