plugin advimage for tinymce 4.x - tinymce-4

i need vspace, hspace or align for image, than will be found on advimage for tinymce 3.x.
i was try put advimage plugin on tinymce 4.x but error.
i was try this step
I copy advimage folder plugin from tinymcd 3.x into 4.x
i was add "img[!src|border:0|alt|title|width|height|style]a[name|href|target|title|onclick]" to extended_valid_elements option.
i get from this tutorial :
advimage-advanced-image-plugin
that step is still not working....

The "advimage" plugin is not available for TinyMCE 4, but you can add an "Advanced" tab on the image dialog box using the image_advtab option. For example:
tinymce.init({
plugins: ["image", ... others ... ],
image_advtab: true,
...
});

ADVIMAGE is not yet supported in version 4.
Look here for the plugins that were dropped:
http://www.tinymce.com/wiki.php/Tutorial:Migration_guide_from_3.x

Related

Changing tooltip for link buttons

Does anyone know how to change the tooltip for the TinyMCE 4.x link buttons:
Thanks
Tooltips are defined when the button is created. For the button in question look in the link plugin code which is in the plugins/link folder within TinyMCE. You can find the addButton code there and change it as needed:
editor.addButton('unlink', {
icon: 'unlink',
tooltip: 'Remove link',
cmd: 'unlink',
stateSelector: 'a[href]'
});
....note that there are both minified and non-minified versions of the plugin code so change both to make sure your changes will work regardless of whether or not you load the minified or non-minified version of TinyMCE.

Link/unlink buttons missing in Wordpress editor

I can't wrap my head around this: the link and unlink buttons just don't show in the TinyMCE editor. I tried to include them with the mce_buttons filter as well, but with no luck.
Where should I look?
Removing add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' )
from the functions.php file worked for me.
I was searching for a solution for this unlink button missing from WordPress version 4.9 then I found this thread https://wordpress.org/support/topic/unlink-in-editor-menu/#post-9964651
Then I installed WP Edit & TinyMCE Advanced. Both the plugin back my needed unlink button without any configuration. Just installed and checked editor page, you can try yourself.
Check My Editor's Screenshot

New template not showing up in Template dropdown

I've created a twentyfourteen child theme using the One-click child theme plugin. Then I copied the page.php template from the parent theme folder to the file new-template.php in the child folder. I changed the header in new-template.php to
Template Name: New Template
As far as I know that's all I need to do to get "New Template" to show up in the Template dropdown under Page Attributes when you create a new page. But "New Template" hasn't been added to the dropdown. Does anyone know what the problem might be?
Thank for any help
Just in Wordpress 4.9 there's this bug: https://core.trac.wordpress.org/ticket/42573 causing the template files to only be rescanned once every hour.
To fix (until they release a new WP version with this changed), download the patch on that bug ticket and make the changes from the patch to wp-includes/class-wp-theme.php.
Hope this saves someone the 2 hours I wasted on this..
For the Wordpress 4.9 bug mentioned above, just update the version of your theme in style.css, e.g. from 1.1.2 to 1.1.3 - even 1.1.2-1 will do. This will force updating templates list.
Please make sure You have activated your child theme, if your child theme is already activated then try a different template name.
This worked for me :
<?php /* Template Name: Red Template */ ?>
and a copy of page.php in my theme dir called redpage.php
I also had to log out of the admin and then log back in.
I tried everything and finally did as stol mentioned above. Update the verison of your theme is style.css located in your themes folder. Mine was set to 0.1.3. I updated to 1.1.2 and it worked.
1.active your child theme
2.if you optimze your style.css file add again your first comment such as
/*
Theme Name:
Description:
Author:
Theme URI:
Author URI:
Version:
Template:
License:
License URI:
Text Domain:
Tags:
*/

Wordpress - Adding TinyMCE on Frontend into jQuery UI widget

I'm creating a Wordpress App. It consists on using custom fields on custom type, for managing personal projects.
My issue: I want to add the admin editor (tinyMCE) on frontend. Considering that I can have many textareas that will begin TinyMCE editors. So, I used this code:
PHP (on theme functions.php):
// TINY-MCE EDITOR ON FRONTEND
add_filter('wp_head','add_tinymce_editor');
function add_tinymce_editor(){
wp_admin_css('thickbox');
wp_enqueue_script('wp-tinymce');
wp_enqueue_script('tinymce');
wp_enqueue_script('editor');
add_thickbox();
}
JS (on theme single-projects.php):
jQuery(document).ready(function(){
// EDITORS
tinyMCE.init({
mode : "specific_textareas",
theme : "simple",
editor_selector :"tinymce_enabled"
});
});
On JS I set the "editor_selector" with a Class for all textareas that will begin tinyMCE editors. I cannot assign a single ID for each textareas because these can be 4 or 5 or 6, or more!!!
HTML: (on theme single-projects.php):
<textarea name="new-task-description" id="new-task-description"
class="tinymce_enabled required"></textarea>
Each textarea is present on Jquery UI Accordions.
Now, my problem is, on Firebug (or browser console) I get this error:
tinyMCE is not defined
What's wrong?
thanks in advance!!!
With Wordpress 3.3 you can use wp_editor() which is a lot easier.
http://codex.wordpress.org/Function_Reference/wp_editor
The right way to include scripts is add_action('wp_enqueue_scripts', 'tinymce_editor');
If tinymce is not defined the file tiny_mce.js has not been loaded on the page. Make sure the file gets loaded eigther directly or with the means wordpress offers.

How do I find out what version of WordPress is running?

I have just taken over someone's hosted WordPress site. How do I find out what version he is running?
Look in wp-includes/version.php
/**
* The WordPress version string
*
* #global string $wp_version
*/
$wp_version = '2.8.4';
Unless he edited some code to delete this, you should be able to view source on the site and look for this meta tag:
<meta name="generator" content="WordPress 2.7.1" />
That will give you the version.
On the Admin Panel Dashboard, you can find a box called "Right Now". There you can see the version of the WordPress installation. I have seen this result in WordPress 3.2.1. You can also see this in version 3.7.1
UPDATE:
In WP Version 3.8.3
In WP Version 3.9.1 Admin Side, You can see the version by clicking the WP logo which is located at the left-top position.
You can use yoursitename/readme.html
In the WordPress Admin Footer at the Right side, you will see the version info(Version 3.9.1).
You can get the WordPress version using the following code:
<?php bloginfo('version'); ?>
The below file is having all version details
wp-includes/version.php
Update for WP 4.1.5
In WP 4.1.5, If it was the latest WP version in the footer right part, it will show the version as it is. If not, it will show the latest WP version with the link to update.
Check the below screenshot.
For any wordpress site, you can go to http://example.com/feed and check the following tag in the xml file to see the version number:
<generator>http://wordpress.org/?v=3.7</generator>
Here, 3.7 is the version installed.
If you came here to find out about how to check WordPress version programmatically, then you can do it with the following code.
// Get the WP Version global.
global $wp_version;
// Now use $wp_version which will return a string value.
echo '<pre>' . var_dump( $wp_version ) . '</pre>';
// Output: string '4.6.1' (length=5)
Cheers!
Every WP install has a readme.html file.
So just type www.yourdomain.com/readme.html
The easiest way would be to use the readme.html file that comes with every WordPress installation (unless you deleted it).
http://example.com/readme.html
Note: it looks like the readme.html file no longer outputs the current WordPress version. So, there is no way, for now, to see the current WordPress version without logging into the dashboard.
On the Admin panel in the footer you should see the words "Wordpress x.x" where x.x is your version number :)
Alternatively you can echo out the WP_VERSION constant in your script, it's up to you. The former is a lot quicker and easier.
From Dashboard At a Glance box
or at the bottom right corner of any admin page.
If that Glance box is hidden - click on screen options at top-right corner and check At a Glance option.
Because I can not comment to #Michelle 's answer, I post my trick here.
Instead of checking the version on meta tag that usually is removed by a customized theme.
Check the rss feed by append /feed to almost any link from that site, then search for some keywords (wordpress, generator), you will have a better chance.
<lastBuildDate>Fri, 29 May 2015 10:08:40 +0000</lastBuildDate>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>http://wordpress.org/?v=4.2.2</generator>
Just go to follow link
domain.com/wp-admin/about.php
Open the blog, Check source once the blog is open. It should have a meta tag like:
<meta name="generator" content="WordPress 2.8.4" />
Yet another way to find the WordPress version is using WP-CLI: Command line interface for WordPress:
wp core version
From experience with WordPress 3.8.3:
(1) Login as admin
(2) Click on the W menu in the upper left corner
(3) Click on menu item "About WordPress".
This will take you to .../wp-admin/about.php
There it will say "Welcome to WordPress 3.8.3"
I know I'm super late regarding this topic but there's this easy to use library where you can easily get the version numbers of Worpress, PHP, Apache, and MySQL, all-in-one.
It is called the Wordpress Environment (W18T) library
<?php
include_once 'W18T.class.php';
$environment = new W18T();
echo $environment;
?>
Output
{
"platform": {
"name": "WordPress",
"version": "4.9.1"
},
"interpreter": {
"name": "PHP",
"version": "7.2.0"
},
"web_server": {
"name": "Apache",
"version": "2.4.16"
},
"database_server": {
"name": "MySQL",
"version": "5.7.20"
},
"operating_system": {
"name": "Darwin",
"version": "17.0.0"
}
}
I hope it helps.
In dashboard you can see running word press version at "At a Glance"

Resources