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
| / * | |
| * Exemple: | |
| * <div contenteditable="true" data-placeholder="Текст заглушки"></div> | |
| * | |
| */ | |
| [contenteditable=true]:empty:before { | |
| content: attr(data-placeholder); | |
| } |
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 | |
| function remove_yoastdebugmarker(){ | |
| if(defined( 'WPSEO_VERSION' )) { | |
| $wpseo_front = null; | |
| if ( isset( $GLOBALS['wpseo_front'] ) ) | |
| $wpseo_front = $GLOBALS['wpseo_front']; | |
| elseif ( class_exists( 'WPSEO_Frontend' ) && method_exists( 'WPSEO_Frontend', 'get_instance' ) ) | |
| $wpseo_front = WPSEO_Frontend::get_instance(); | |
| remove_action( 'wpseo_head', array($wpseo_front, 'debug_marker') , 2 ); | |
| } |
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
| I use the first | |
| —– BEGIN LICENSE —– | |
| Michael Barnes | |
| Single User License | |
| EA7E-821385 | |
| 8A353C41 872A0D5C DF9B2950 AFF6F667 | |
| C458EA6D 8EA3C286 98D1D650 131A97AB | |
| AA919AEC EF20E143 B361B1E7 4C8B7F04 |
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
| # Based on http://fearby.com/article/update-openssl-on-a-digital-ocean-vm/ | |
| $ sudo apt-get update | |
| $ sudo apt-get dist-upgrade | |
| $ wget ftp://ftp.openssl.org/source/openssl-1.0.2h.tar.gz | |
| $ tar -xvzf openssl-1.0.2h.tar.gz | |
| $ cd openssl-1.0.2h | |
| $ ./config --prefix=/usr/ | |
| $ make depend |
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 | |
| /** | |
| * Strip out all shortcode content. | |
| * | |
| * This is a quick and dirty way | |
| * to ensure no shortcodes introduce | |
| * invalid markup into an amp template. | |
| * | |
| * @param string $content WP Post content. | |
| * |
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 the amp-sidebar and amp-accordion component scripts with WP AMP. | |
| * | |
| * This goes in your amp.php | |
| */ | |
| function jr3_amp_component_scripts( $data ) { | |
| $data['amp_component_scripts']['amp-sidebar'] = 'https://cdn.ampproject.org/v0/amp-sidebar-0.1.js'; | |
| $data['amp_component_scripts']['amp-accordion'] = 'https://cdn.ampproject.org/v0/amp-accordion-0.1.js'; |
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 | |
| /** | |
| * Show an Admin Notice if the AMP plugin is not found. | |
| * | |
| * This is a basic implementation. Naturally, you'll want | |
| * to add ajax support so that once this is dismissed, it goes | |
| * away permanently. Also, you may want to limit the admin | |
| * pages this displays to prevent annoying your users. | |
| * | |
| * @return bool |
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 custom AMP template files. | |
| * | |
| * Registers templates in a /templates subdirectory. | |
| * | |
| * @filter amp_post_template_file | |
| * | |
| * @param string $file The file name input. | |
| * @param string $type The type of template. |